diff options
author | Sergey Nazaryev <sergey@nazaryev.ru> | 2016-12-19 16:03:15 +0000 |
---|---|---|
committer | Sergey Nazaryev <sergey@nazaryev.ru> | 2016-12-19 16:03:15 +0000 |
commit | d6ac611202f9a579293f53222fadc0840f8a69f0 (patch) | |
tree | bcca9a62efd2be033a026b7ecf1e3e36d247ff5b /vimrc | |
parent | c08548201660447a70c39ef8bfed61c2d0981a52 (diff) | |
download | dotfiles-d6ac611202f9a579293f53222fadc0840f8a69f0.zip dotfiles-d6ac611202f9a579293f53222fadc0840f8a69f0.tar.gz dotfiles-d6ac611202f9a579293f53222fadc0840f8a69f0.tar.bz2 |
Correct tab widths for *.c, *.dts and Makefile
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -43,11 +43,6 @@ set lazyredraw " no lags set ttyfast " no lags "set nocompatible -" Settings for specific file types -autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=0 -autocmd FileType c set noexpandtab shiftwidth=4 softtabstop=0 -autocmd FileType dts set noexpandtab shiftwidth=2 softtabstop=0 - " Style settings syntax on " turn on syntax highlight colorscheme elflord @@ -75,6 +70,10 @@ function! StripTrailingWhitespace() endfunction if has("autocmd") + " settings for specific file types + autocmd! FileType make setlocal noexpandtab tabstop=8 shiftwidth=8 softtabstop=8 textwidth=80 + autocmd! FileType c setlocal noexpandtab tabstop=8 shiftwidth=8 softtabstop=8 textwidth=80 + autocmd! FileType dts setlocal noexpandtab tabstop=8 shiftwidth=8 softtabstop=8 textwidth=80 " jump to the last position when reopening a file autocmd! BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif |