blob: 3d7fc6b2033a7b04e36f0beb7805d0c613a2d1e4 [file] [log] [blame]
[email protected]502efd812014-01-16 19:45:441" Copyright (c) 2014 The Chromium Authors. All rights reserved.
2" Use of this source code is governed by a BSD-style license that can be
3" found in the LICENSE file.
4
5" Binds cmd-shift-i (on Mac) or ctrl-shift-i (elsewhere) to invoking
6" clang-format.py.
7" It will format the current selection (and if there's no selection, the
8" current line.)
9
10let s:script = expand('<sfile>:p:h') .
[email protected]394980a22014-07-02 13:12:1311 \'/../../buildtools/clang_format/script/clang-format.py'
[email protected]502efd812014-01-16 19:45:4412echo s:script
13
14if has('mac')
15 execute "map <D-I> :pyf " . s:script . "<CR>"
16 execute "imap <D-I> <ESC>:pyf " . s:script . "<CR>i"
17else
18 execute "map <C-I> :pyf " . s:script . "<CR>"
19 execute "imap <C-I> <ESC>:pyf " . s:script . "<CR>i"
20endif