aboutsummaryrefslogtreecommitdiff
path: root/vim/after/indent
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-23 01:26:12 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-23 01:26:12 +1200
commit87f5f379d52ffa0a4fb8662788fc28a4a5028dc3 (patch)
tree3d606b1c105a91e7204eed0cddd9ed03f08f9f52 /vim/after/indent
parentMerge branch 'release/v6.37.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-2611eef3a83ff42529e287027cf6e064c7ab9adf.tar.gz (sig)
dotfiles-2611eef3a83ff42529e287027cf6e064c7ab9adf.zip
Merge branch 'release/v6.38.0'v6.38.0
* release/v6.38.0: Update paste_insert.vim to v0.3.0 Use tr() over substitute() for character swap Fix up some pattern qualifiers Update digraph_search.vim to v1.1.0 Correct indent settings Don't squeeze blanks by default in mail filetype Improve honesty of comment in mail ftplugin Move mail ftplugin function out into autoload Add local maps for normalising mail quotes Don't do :StrictQuote automatically on mail edit Make :StrictQuote command accept a range
Diffstat (limited to 'vim/after/indent')
-rw-r--r--vim/after/indent/c.vim14
-rw-r--r--vim/after/indent/gitconfig.vim12
-rw-r--r--vim/after/indent/make.vim18
3 files changed, 33 insertions, 11 deletions
diff --git a/vim/after/indent/c.vim b/vim/after/indent/c.vim
index ad01aceb..9cea0a2d 100644
--- a/vim/after/indent/c.vim
+++ b/vim/after/indent/c.vim
@@ -1,9 +1,15 @@
-" Use hard tabs for C
+" Use plain old tabs for indent in C files
setlocal noexpandtab
-setlocal shiftwidth=0
-let b:undo_indent .= '|setlocal expandtab< shiftwidth<'
+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 &softtabstop = &shiftwidth
+ let &l:softtabstop = &l:shiftwidth
let b:undo_indent .= '|setlocal softtabstop<'
endif
diff --git a/vim/after/indent/gitconfig.vim b/vim/after/indent/gitconfig.vim
index ff1654e5..943e78ea 100644
--- a/vim/after/indent/gitconfig.vim
+++ b/vim/after/indent/gitconfig.vim
@@ -1,9 +1,15 @@
" Use tabs for indent in Git config files, rather than fighting with the
" frontend tool
setlocal noexpandtab
-setlocal shiftwidth=0
-let b:undo_indent .= '|setlocal expandtab< shiftwidth<'
+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 &softtabstop = &shiftwidth
+ let &l:softtabstop = &l:shiftwidth
let b:undo_indent .= '|setlocal softtabstop<'
endif
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