From eb59f4550894257af6033b95d23e3971d369e8b8 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 29 Dec 2022 02:37:04 -0500 Subject: [PATCH] Provide g:is_posix default Resolves: https://github.com/tpope/vim-sensible/issues/140 Resolves: https://github.com/tpope/vim-sensible/pull/127 --- plugin/sensible.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/sensible.vim b/plugin/sensible.vim index a4900fa..d4ba37d 100644 --- a/plugin/sensible.vim +++ b/plugin/sensible.vim @@ -141,6 +141,11 @@ if exists(":DiffOrig") != 2 \ | diffthis | wincmd p | diffthis endif +" Correctly highlight $() and other modern affordances in filetype=sh. +if !exists('g:is_posix') && !exists('g:is_bash') && !exists('g:is_kornshell') && !exists('g:is_dash') + let g:is_posix = 1 +endif + " Load matchit.vim, but only if the user hasn't installed a newer version. if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# '' runtime! macros/matchit.vim