blob: 478dbb3f8ce9ac96eee011609dd0e9d916400748 [file] [log] [blame]
Avi Drissmandfd880852022-09-15 20:11:091" Copyright 2014 The Chromium Authors
[email protected]502efd812014-01-16 19:45:442" Use of this source code is governed by a BSD-style license that can be
3" found in the LICENSE file.
4
Lei Zhang8fe45412020-10-28 01:36:565" Binds cmd-shift-i (on Mac) or ctrl-i (elsewhere) to invoke clang-format.py.
[email protected]502efd812014-01-16 19:45:446" It will format the current selection (and if there's no selection, the
7" current line.)
8
9let s:script = expand('<sfile>:p:h') .
[email protected]394980a22014-07-02 13:12:1310 \'/../../buildtools/clang_format/script/clang-format.py'
Sidney San Martínfe5c01de2019-02-15 20:47:3211let s:shortcut = has('mac') ? "<D-I>" : "<C-I>"
12let s:pyf = has("python3") ? ":py3f" : ":pyf"
[email protected]502efd812014-01-16 19:45:4413
Sidney San Martínfe5c01de2019-02-15 20:47:3214execute "map" s:shortcut s:pyf s:script . "<CR>"
Wojciech Dzierżanowskidabad232019-03-29 17:19:5515execute "imap" s:shortcut "<ESC>" s:pyf s:script . "<CR>i"