diff --git a/.vim/vimrc b/.vim/vimrc index f2bbbff..a447450 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -551,15 +551,24 @@ au FileType rust setl \ tabstop=8 shiftwidth=8 softtabstop=8 noexpandtab autoindent ff=unix au BufNewFile,BufRead *.py,*.pyw,*.pyx,?akefil* - \ setlocal tabstop=4 shiftwidth=4 noexpandtab autoindent - \ fileformat=unix + \ setlocal tabstop=4 shiftwidth=4 noexpandtab autoindent + \ fileformat=unix -au FileType c setl ofu=ccomplete#CompleteCpp +" Linux kernel style tabs - not for cpp +" au BufNewFile,BufRead,BufEnter *.c,*.h,*.cpp +au BufNewFile,BufRead,BufEnter *.c,*.h + \ set tabstop=8 shiftwidth=8 softtabstop=8 noexpandtab autoindent + \ textwidth=79 fileformat=unix omnifunc=lsp#complete + +au BufNewFile,BufRead,BufEnter *.cpp,*.h,*.hpp + \ set tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent + \ textwidth=79 fileformat=unix omnifunc=lsp#complete ft=cpp + " \ textwidth=79 fileformat=unix +au FileType cpp + \ set tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab autoindent + \ textwidth=79 fileformat=unix omnifunc=lsp#complete + " \ textwidth=79 fileformat=unix -" Linux kernel style tabs -au BufNewFile,BufRead,BufEnter *.c,*.h,*.cpp - \ setlocal tabstop=8 shiftwidth=8 softtabstop=8 noexpandtab autoindent - \ textwidth=79 fileformat=unix au BufNewFile,BufRead,BufEnter *.tex \ setlocal tabstop=2 shiftwidth=2 softtabstop=2 expandtab autoindent