aboutsummaryrefslogtreecommitdiff
path: root/vim/after/syntax/sh.vim
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after/syntax/sh.vim')
-rw-r--r--vim/after/syntax/sh.vim12
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