15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)" Copyright (c) 2014 The Chromium Authors. All rights reserved. 25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)" Use of this source code is governed by a BSD-style license that can be 35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)" found in the LICENSE file. 45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)" Binds cmd-shift-i (on Mac) or ctrl-shift-i (elsewhere) to invoking 65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)" clang-format.py. 75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)" It will format the current selection (and if there's no selection, the 85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)" current line.) 95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)let s:script = expand('<sfile>:p:h') . 11116680a4aac90f2aa7413d9095a592090648e557Ben Murdoch \'/../../buildtools/clang_format/script/clang-format.py' 125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)if has('mac') 145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) execute "map <D-I> :pyf " . s:script . "<CR>" 155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) execute "imap <D-I> <ESC>:pyf " . s:script . "<CR>i" 165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)else 175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) execute "map <C-I> :pyf " . s:script . "<CR>" 185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) execute "imap <C-I> <ESC>:pyf " . s:script . "<CR>i" 195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)endif 20