path: root/vim/after/ftplugin/sh.vim
diff options
authorTom Ryder <tom@sanctum.geek.nz>2016-12-11 16:22:36 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-12-11 16:38:45 +1300
commit52615f646626e93a1560d3bcebcdf122f246e59a (patch)
tree67c0c349b2998459588a9e96ff9814827ece5719 /vim/after/ftplugin/sh.vim
parentDisable sh error syntax highlighting for now (diff)
Still untangling the shell highlighting mess
Diffstat (limited to 'vim/after/ftplugin/sh.vim')
1 files changed, 6 insertions, 12 deletions
diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim
index 61ff9ae8..2b73611e 100644
--- a/vim/after/ftplugin/sh.vim
+++ b/vim/after/ftplugin/sh.vim
@@ -1,15 +1,9 @@
-" Don't highlight errors for me; something not quite right here. The syntax
-" highlighter seems to flag '/baz' in '"${foo:-"$bar"/baz}"' as an error, and
-" I'm pretty sure it's not.
-let g:sh_noerror = 1
-" If the file is not already tagged as a shell type, default to POSIX shell,
-" as I never write Bourne. I would set g:is_posix here rather than b:is_posix,
-" but sh.vim makes some weird assumptions about me actually meaning ksh for
-" some reason when I do that.
-if !exists('b:is_kornshell') && !exists('b:is_bash') && !exists('b:is_posix')
- let b:is_posix = 1
+" Default to POSIX shell, as I never write Bourne, and if I write Bash or Ksh
+" it'll be denoted with either a shebang or an appropriate extension. At the
+" time of writing, changing this also prompts sh.vim to set g:is_kornshell,
+" which is absurd, and requires a bit more massaging in after/syntax/sh.vim to
+" turn off some unwanted stuff.
+let g:is_posix = 1
" Use han(1df) as a man(1) wrapper for Bash files if available
if exists('b:is_bash') && executable('han')