From: Colin Patrick McCabe Date: Sat, 17 Sep 2011 03:10:53 +0000 (-0700) Subject: vimrc: default C, CPP to kernel style indent X-Git-Url: http://club.cc.cmu.edu/~cmccabe/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d809e7e07429d8a47e22fefa696217d5ef7cc1cc;p=cmccabe-etc vimrc: default C, CPP to kernel style indent Signed-off-by: Colin McCabe --- diff --git a/.vim/indent/c.vim b/.vim/indent/c.vim index 2289806..99386a2 100644 --- a/.vim/indent/c.vim +++ b/.vim/indent/c.vim @@ -10,7 +10,7 @@ set sw=8 set ts=8 set noet -" 100 column limit -set tw=100 +" 80 column limit +set tw=80 -set cinoptions+=g2h2:2=2t0(0 +set cinoptions=:0,l1,t0,g0,(0 " C-Indent options: Linux-kernel style diff --git a/.vim/indent/cpp.vim b/.vim/indent/cpp.vim index 04e779b..cb80567 100644 --- a/.vim/indent/cpp.vim +++ b/.vim/indent/cpp.vim @@ -5,19 +5,12 @@ endif source $VIMRUNTIME/indent/cpp.vim let b:did_indent = 1 -" ceph style tabs -set tabstop=8 -set softtabstop=2 -set shiftwidth=2 -set noexpandtab +" Linux kernel style indentation +set sw=8 +set ts=8 +set noet -" Traditional cpp four-space indentation -"set sw=4 -"set ts=4 -"set et - -" 100 column limit -set tw=100 - -set cinoptions+=g2h2:2=2t0(0 +" 80 column limit +set tw=80 +set cinoptions=:0,l1,t0,g0,(0 " C-Indent options: Linux-kernel style