From d5d77ee7f5b6fd23bfb899137c1aef282177748f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 11 Dec 2016 14:55:10 +1300 Subject: Set buffer type (not global type) for sh properly --- vim/after/ftplugin/sh.vim | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'vim/after/ftplugin/sh.vim') diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim index c9e0297c..c79dab74 100644 --- a/vim/after/ftplugin/sh.vim +++ b/vim/after/ftplugin/sh.vim @@ -1,6 +1,9 @@ -" If the file is not already tagged as either ksh nor bash, assume POSIX shell -if !exists('g:is_kornshell') && !exists('g:is_bash') - let g:is_posix = 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 endif " Use han(1df) as a man(1) wrapper for Bash files if available -- cgit v1.2.3