Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: tools/vim/clang-format.vim

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/vim/chromium.ycm_extra_conf.py ('k') | tools/vim/filetypes.vim » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/vim/clang-format.vim
diff --git a/tools/vim/clang-format.vim b/tools/vim/clang-format.vim
new file mode 100644
index 0000000000000000000000000000000000000000..982b8d2ed0f5e5c970ef0ca744b1b7f292dc948b
--- /dev/null
+++ b/tools/vim/clang-format.vim
@@ -0,0 +1,19 @@
+" Copyright (c) 2014 The Chromium Authors. All rights reserved.
+" Use of this source code is governed by a BSD-style license that can be
+" found in the LICENSE file.
+
+" Binds cmd-shift-i (on Mac) or ctrl-shift-i (elsewhere) to invoking
+" clang-format.py.
+" It will format the current selection (and if there's no selection, the
+" current line.)
+
+let s:script = expand('<sfile>:p:h') .
+ \'/../../buildtools/clang_format/script/clang-format.py'
+
+if has('mac')
+ execute "map <D-I> :pyf " . s:script . "<CR>"
+ execute "imap <D-I> <ESC>:pyf " . s:script . "<CR>i"
+else
+ execute "map <C-I> :pyf " . s:script . "<CR>"
+ execute "imap <C-I> <ESC>:pyf " . s:script . "<CR>i"
+endif
« no previous file with comments | « tools/vim/chromium.ycm_extra_conf.py ('k') | tools/vim/filetypes.vim » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698