aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-19 15:23:16 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-19 15:23:16 +1200
commitb5862a03d07d378d62899acbe0ab31a785caac6e (patch)
tree639376d2d6e5956e141f522d2b2bd7c4718f9126 /vim/after/ftplugin
parent6bd14e07a3ffd882c5eb236a79280b0d00ba3047 (diff)
downloaddotfiles-b5862a03d07d378d62899acbe0ab31a785caac6e.tar.gz
dotfiles-b5862a03d07d378d62899acbe0ab31a785caac6e.zip
Inline option resets and undos in Vim C ftplugin
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r--vim/after/ftplugin/c.vim10
1 files changed, 4 insertions, 6 deletions
diff --git a/vim/after/ftplugin/c.vim b/vim/after/ftplugin/c.vim
index d1f6ef0b..dd99e81f 100644
--- a/vim/after/ftplugin/c.vim
+++ b/vim/after/ftplugin/c.vim
@@ -1,15 +1,13 @@
" Set 'commentstring', 'define', and 'include' back to their default C-friendly values
-setlocal commentstring&vim
-setlocal define&vim include&vim
-setlocal include&vim
+setlocal commentstring&vim define&vim include&vim
+let b:undo_ftplugin .= '|setlocal commentstring< define< include<'
" Include macros in completion
setlocal complete+=d
+let b:undo_ftplugin .= '|setlocal complete<'
" Include system headers on UNIX
if has('unix')
setlocal path+=/usr/include
+ let b:undo_ftplugin .= '|setlocal path<'
endif
-
-" Undo all of the above
-let b:undo_ftplugin .= '|setlocal commentstring< complete< include< path<'