Fix --force-device-scale-factor on Mac
[chromium-blink-merge.git] / tools / vim / clang-format.vim
blob982b8d2ed0f5e5c970ef0ca744b1b7f292dc948b
1 " 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.
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.)
10 let s:script = expand('<sfile>:p:h') .
11   \'/../../buildtools/clang_format/script/clang-format.py'
13 if has('mac')
14   execute "map <D-I> :pyf " . s:script . "<CR>"
15   execute "imap <D-I> <ESC>:pyf " . s:script . "<CR>i"
16 else
17   execute "map <C-I> :pyf " . s:script . "<CR>"
18   execute "imap <C-I> <ESC>:pyf " . s:script . "<CR>i"
19 endif