From 142642341841fb1d501db76a844d14178dca6da6 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Thu, 27 Aug 2015 01:48:17 +0100 Subject: [PATCH] vim/cpp: force some indent options don't indent case labels don't reindent preprecessor directives --- vim/ftplugin/cpp.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vim/ftplugin/cpp.vim b/vim/ftplugin/cpp.vim index 7fd300c..534eb78 100644 --- a/vim/ftplugin/cpp.vim +++ b/vim/ftplugin/cpp.vim @@ -1,5 +1,18 @@ setlocal foldmethod=syntax +setlocal textwidth=100 + +" indent 4 spaces +setlocal shiftwidth=4 +setlocal tabstop=4 +setlocal softtabstop=4 +setlocal expandtab + +setlocal nosmartindent +setlocal autoindent +setlocal cinkeys-=0# " don't reindent PP directives +setlocal cinoptions+=:0 " don't indent case labels + augroup fswitch au BufEnter *.h let b:fswitchdst = 'cpp,c' au BufEnter *.h let b:fswitchlocs = 'reg:/include/source/' -- 2.48.1