aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-06-29 20:20:09 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-06-29 20:20:09 +1200
commitaec4a96d015f20b6c3134bac568afc9ef0a9f9ab (patch)
tree56833839b84cd10c29dc8c3389716cb7bb496d86
parentBreak sh noglob guard into two lines for clarity (diff)
downloaddotfiles-aec4a96d015f20b6c3134bac568afc9ef0a9f9ab.tar.gz
dotfiles-aec4a96d015f20b6c3134bac568afc9ef0a9f9ab.zip
Reduce shell format ftplugin to just 'comments'
-rw-r--r--vim/after/ftplugin/sh/comments.vim11
1 files changed, 5 insertions, 6 deletions
diff --git a/vim/after/ftplugin/sh/comments.vim b/vim/after/ftplugin/sh/comments.vim
index 0cb671e5..247fa2b0 100644
--- a/vim/after/ftplugin/sh/comments.vim
+++ b/vim/after/ftplugin/sh/comments.vim
@@ -1,4 +1,4 @@
-" sh/format.vim: Set 'comments' and 'formatoptions'
+" sh/comments.vim: Set 'comments' for shell script
" Don't load if running compatible or too old
if &compatible || v:version < 700
@@ -6,17 +6,16 @@ if &compatible || v:version < 700
endif
" Don't load if already loaded
-if exists('b:did_ftplugin_sh_format')
+if exists('b:did_ftplugin_sh_comments')
finish
endif
" Flag as loaded
-let b:did_ftplugin_sh_format = 1
+let b:did_ftplugin_sh_comments = 1
let b:undo_ftplugin = b:undo_ftplugin
- \ . '|unlet b:did_ftplugin_sh_format'
+ \ . '|unlet b:did_ftplugin_sh_comments'
" Use trailing whitespace to denote continued paragraph
setlocal comments=:#
-setlocal formatoptions-=t formatoptions+=cloqr
let b:undo_ftplugin = b:undo_ftplugin
- \ . '|setlocal comments< formatoptions<'
+ \ . '|setlocal comments<'