aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-08 12:51:30 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-08 12:51:30 +1300
commit388081f881656dece4388ba448713b9f2f062905 (patch)
treeb54c28a0d87059ca2b0b773995a2a24187ce7911
parent129d77372dc3ea6c4a981a97620c10ca0ad90d29 (diff)
downloaddotfiles-388081f881656dece4388ba448713b9f2f062905.tar.gz
Disable unwanted shell error syntax for any shell
-rw-r--r--vim/after/syntax/sh.vim19
1 files changed, 7 insertions, 12 deletions
diff --git a/vim/after/syntax/sh.vim b/vim/after/syntax/sh.vim
index 930255fc..48a3452d 100644
--- a/vim/after/syntax/sh.vim
+++ b/vim/after/syntax/sh.vim
@@ -9,19 +9,14 @@ elseif exists('b:is_posix')
unlet! b:is_sh
endif
-" Some corrections for highlighting if we have any of POSIX, Bash, or Ksh
-if exists('g:is_posix') || exists('b:is_bash') || exists('b:is_ksh')
+" The syntax highlighter seems to flag '/baz' in '"${foo:-"$bar"/baz}"' as an
+" error, which it isn't, at least in POSIX sh, Bash, and Ksh.
+syntax clear shDerefWordError
- " The syntax highlighter seems to flag '/baz' in '"${foo:-"$bar"/baz}"' as an
- " error, and I'm pretty sure it's not, at least in POSIX sh, Bash, and Ksh.
- syntax clear shDerefWordError
-
- " The syntax highlighter doesn't match parens for subshells for 'if' tests
- " correctly if they're on separate lines. This happens enough that it's
- " probably not worth keeping the error.
- syntax clear shParenError
-
-endif
+" The syntax highlighter doesn't match parens for subshells for 'if' tests
+" correctly if they're on separate lines. This happens enough that it's
+" probably not worth keeping the error.
+syntax clear shParenError
" Some corrections for highlighting specific to the Bash mode
if exists('b:is_bash')