diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-22 21:54:41 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-22 21:54:41 +1200 |
commit | 9931b35cc197c76350b2e22e0a1fe6536888ac53 (patch) | |
tree | 420c1bba0de3f0d781680c2ca3ed5345662144e0 /vim/after/indent/make.vim | |
parent | Don't squeeze blanks by default in mail filetype (diff) | |
download | dotfiles-9931b35cc197c76350b2e22e0a1fe6536888ac53.tar.gz dotfiles-9931b35cc197c76350b2e22e0a1fe6536888ac53.zip |
Correct indent settings
Diffstat (limited to 'vim/after/indent/make.vim')
-rw-r--r-- | vim/after/indent/make.vim | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/vim/after/indent/make.vim b/vim/after/indent/make.vim index 341cd7f6..d45487b4 100644 --- a/vim/after/indent/make.vim +++ b/vim/after/indent/make.vim @@ -1,4 +1,14 @@ -" Use 'tabstop' (8 columns, a full tab) for indent operations in Makefiles. -" It seems odd that the stock plugin doesn't force this on its own. -setlocal shiftwidth=0 -let b:undo_indent = 'setlocal shiftwidth<' +" Use plain old tabs for Makefiles (of course) +setlocal noexpandtab +let b:undo_indent .= '|setlocal expandtab<' +if v:version > 703 + \ || v:version == 703 && has('patch629') + setlocal shiftwidth=0 +else + let &l:shiftwidth = &l:tabstop +endif +let b:undo_indent .= '|setlocal shiftwidth<' +if &softtabstop != -1 + let &l:softtabstop = &l:shiftwidth + let b:undo_indent .= '|setlocal softtabstop<' +endif |