diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-17 15:58:30 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-17 15:58:30 +1200 |
commit | 69469b0f076053df4977404d5272f1a9373c3629 (patch) | |
tree | 770f867c4684c64728455cce7609f58466575023 | |
parent | Add my own ftplugin for awk (diff) | |
download | dotfiles-69469b0f076053df4977404d5272f1a9373c3629.tar.gz dotfiles-69469b0f076053df4977404d5272f1a9373c3629.zip |
Add handling for older sh.vim syntax g:is_posix
-rw-r--r-- | vim/after/ftplugin/sh.vim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim index 41b1796f..88254ea6 100644 --- a/vim/after/ftplugin/sh.vim +++ b/vim/after/ftplugin/sh.vim @@ -26,6 +26,11 @@ execute 'compiler '.b:sh_check_compiler let b:undo_ftplugin .= '|unlet b:current_compiler b:sh_check_compiler' \ . '|setlocal errorformat< makeprg<' +" Resort to g:is_posix for correct syntax on older runtime files +if b:is_posix && (v:version < 800 || v:version == 800 && !has('patch257')) + let g:is_posix = 1 +endif + " Stop here if the user doesn't want ftplugin mappings if exists('g:no_plugin_maps') || exists('g:no_sh_maps') finish |