From ec775b023b0e83f413708d1bf294ab3abcaed666 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 21 Jan 2018 23:34:32 +1300 Subject: Suspend 'C' from 'cpoptions' for sh syn extensions This allows me to use line-breaking to keep the file readable. --- vim/after/syntax/sh.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- cgit v1.2.3