]> Untitled Git - vimfiles.git/commitdiff
clang format settings
authorPhilippe Hürlimann <p@hurlimann.org>
Fri, 17 Mar 2017 11:58:41 +0000 (12:58 +0100)
committerPhilippe Hürlimann <p@hurlimann.org>
Fri, 17 Mar 2017 11:58:41 +0000 (12:58 +0100)
ftplugin/c.vim
ftplugin/javascript.vim [new file with mode: 0644]

index e0c7d37bfded9e2e75675d5562bc6db2cc3260c1..cd7cca0af0cea095bcfebd6e8bdfb0161a82803e 100644 (file)
@@ -1,7 +1,7 @@
 let g:clang_complete_copen=1
 let g:clang_auto_select=1
 
-function FormatFile()
+function! FormatFile()
     let l:lines="all"
     pyf /usr/share/clang/clang-format.py
 endfunction
diff --git a/ftplugin/javascript.vim b/ftplugin/javascript.vim
new file mode 100644 (file)
index 0000000..2f4f576
--- /dev/null
@@ -0,0 +1,7 @@
+function! FormatFile()
+    let l:lines="all"
+    pyf /usr/share/clang/clang-format.py
+endfunction
+
+nnoremap <leader>f :call FormatFile()<cr>
+