diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-01-21 23:34:32 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-01-21 23:34:32 +1300 |
commit | ec775b023b0e83f413708d1bf294ab3abcaed666 (patch) | |
tree | 3de06ca0cc53dacac71f9b0beb858bfe12c3f079 /vim/after/syntax | |
parent | Join short-circuit line in detect_background.vim (diff) | |
download | dotfiles-ec775b023b0e83f413708d1bf294ab3abcaed666.tar.gz dotfiles-ec775b023b0e83f413708d1bf294ab3abcaed666.zip |
Suspend 'C' from 'cpoptions' for sh syn extensions
This allows me to use line-breaking to keep the file readable.
Diffstat (limited to 'vim/after/syntax')
-rw-r--r-- | vim/after/syntax/sh.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vim/after/syntax/sh.vim b/vim/after/syntax/sh.vim index 08dbd857..026e4ebd 100644 --- a/vim/after/syntax/sh.vim +++ b/vim/after/syntax/sh.vim @@ -1,3 +1,9 @@ +" Support line continuation for this file +if &compatible + let s:cpoptions_save = &cpoptions + set cpoptions-=C +endif + " If we know we have another shell type, clear away the others completely, now " that core syntax/sh.vim is done prodding /bin/sh to determine the system " shell type (which I don't care about). @@ -210,3 +216,9 @@ if exists('b:is_bash') \ variables \ wait endif + +" Restore 'cpoptions' setting if we touched it +if exists('s:cpoptions_save') + let &cpoptions = s:cpoptions_save + unlet s:cpoptions_save +endif |