aboutsummaryrefslogtreecommitdiff
path: root/vim/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'vim/ftplugin')
-rw-r--r--vim/ftplugin/mail.vim9
-rw-r--r--vim/ftplugin/markdown.vim9
-rw-r--r--vim/ftplugin/sh.vim9
-rw-r--r--vim/ftplugin/text.vim9
4 files changed, 8 insertions, 28 deletions
diff --git a/vim/ftplugin/mail.vim b/vim/ftplugin/mail.vim
index 236f25ff..d4840bfd 100644
--- a/vim/ftplugin/mail.vim
+++ b/vim/ftplugin/mail.vim
@@ -1,9 +1,4 @@
" Use trailing whitespace to denote continued paragraph
setlocal formatoptions+=w
-
-" Undo
-if !exists('b:undo_ftplugin')
- let b:undo_ftplugin = ''
-endif
-let b:undo_ftplugin = b:undo_ftplugin
- \ . '|setlocal formatoptions<'
+let b:undo_user_ftplugin
+ \ = 'setlocal formatoptions<'
diff --git a/vim/ftplugin/markdown.vim b/vim/ftplugin/markdown.vim
index 15333202..ab27c2f7 100644
--- a/vim/ftplugin/markdown.vim
+++ b/vim/ftplugin/markdown.vim
@@ -1,11 +1,6 @@
" Spellcheck documents by default
if has('syntax')
setlocal spell
-
- " Undo
- if !exists('b:undo_ftplugin')
- let b:undo_ftplugin = ''
- endif
- let b:undo_ftplugin = b:undo_ftplugin
- \ . '|setlocal spell<'
+ let b:undo_user_ftplugin
+ \ = 'setlocal spell<'
endif
diff --git a/vim/ftplugin/sh.vim b/vim/ftplugin/sh.vim
index 85251aa1..21d494e3 100644
--- a/vim/ftplugin/sh.vim
+++ b/vim/ftplugin/sh.vim
@@ -23,6 +23,8 @@ endif
" Use han(1df) as a man(1) wrapper for Bash files if available
if exists('b:is_bash') && executable('han')
setlocal keywordprg=han
+ let b:undo_user_indent
+ \ = 'setlocal keywordprg<'
endif
" Map checker based on shell family
@@ -48,10 +50,3 @@ endif
nnoremap <buffer> <silent>
\ <LocalLeader>l
\ :<C-U>execute b:lint<CR>
-
-" Undo
-if !exists('b:undo_ftplugin')
- let b:undo_ftplugin = ''
-endif
-let b:undo_ftplugin = b:undo_ftplugin
- \ . '|setlocal keywordprg<'
diff --git a/vim/ftplugin/text.vim b/vim/ftplugin/text.vim
index 15333202..ab27c2f7 100644
--- a/vim/ftplugin/text.vim
+++ b/vim/ftplugin/text.vim
@@ -1,11 +1,6 @@
" Spellcheck documents by default
if has('syntax')
setlocal spell
-
- " Undo
- if !exists('b:undo_ftplugin')
- let b:undo_ftplugin = ''
- endif
- let b:undo_ftplugin = b:undo_ftplugin
- \ . '|setlocal spell<'
+ let b:undo_user_ftplugin
+ \ = 'setlocal spell<'
endif