diff options
Diffstat (limited to 'vim/after/ftplugin/sed')
-rw-r--r-- | vim/after/ftplugin/sed/comments.vim | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/vim/after/ftplugin/sed/comments.vim b/vim/after/ftplugin/sed/comments.vim index 4e779d67..53b1524c 100644 --- a/vim/after/ftplugin/sed/comments.vim +++ b/vim/after/ftplugin/sed/comments.vim @@ -1,4 +1,4 @@ -" sed/comments.vim: Set 'comments' for sed +" sed/comments.vim: Set 'comments' and supporting 'formatoptions' for sed " Don't load if running compatible or too old if &compatible || v:version < 700 @@ -6,16 +6,17 @@ if &compatible || v:version < 700 endif " Don't load if already loaded -if exists('b:did_ftplugin_sed_format') +if exists('b:did_ftplugin_sed_comments') finish endif " Flag as loaded -let b:did_ftplugin_sed_format = 1 +let b:did_ftplugin_sed_comments = 1 let b:undo_ftplugin = b:undo_ftplugin - \ . '|unlet b:did_ftplugin_sed_format' + \ . '|unlet b:did_ftplugin_sed_comments' -" Use trailing whitespace to denote continued paragraph +" Set comment formats setlocal comments=:# +setlocal formatoptions+=or let b:undo_ftplugin = b:undo_ftplugin - \ . '|setlocal comments<' + \ . '|setlocal comments< formatoptions<' |