diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-05 00:41:40 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-05 00:41:40 +1300 |
commit | 2044d97b03c31083cc0bb47a3f65d729d98f558b (patch) | |
tree | f41874a69203faf1f1e5780925b06e84310a9eeb /vim/ftplugin/sh.vim | |
parent | Merge branch 'release/v0.7.0' (diff) | |
parent | Bump version number to 0.8.0 (diff) | |
download | dotfiles-0.8.0.tar.gz (sig) dotfiles-0.8.0.zip |
Merge branch 'release/v0.8.0'v0.8.0
* release/v0.8.0:
Bump version number to 0.8.0
Use BufReadPost hook for big_file_options.vim
Limit search highlighting hooks to Vim >= 7.1
Add explanatory note for choosing imperfect remap
Set 'guioptions' flag by flag
Use variable setting approach for 'guifont'
Add short-circuit boilerplate to plugins
Simplify shell linting code with single vars
Use spaces around concat dots in VimL consistently
Remove vim/bundle/html5 submodule
Remove vim/bundle/targets submodule
Adjust plugin code layout a lot
Diffstat (limited to 'vim/ftplugin/sh.vim')
-rw-r--r-- | vim/ftplugin/sh.vim | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/vim/ftplugin/sh.vim b/vim/ftplugin/sh.vim index c09e4fe8..d13f34da 100644 --- a/vim/ftplugin/sh.vim +++ b/vim/ftplugin/sh.vim @@ -27,22 +27,24 @@ endif " Map checker based on shell family if exists('b:is_bash') && b:is_bash - let b:check = 'bash -n' + let b:check = 'write !bash -n' elseif exists('b:is_ksh') && b:is_ksh - let b:check = 'ksh -n' + let b:check = 'write !ksh -n' else - let b:check = 'sh -n' + let b:check = 'write !sh -n' endif -nnoremap <buffer> <silent> <LocalLeader>c - \ :<C-U>execute ':write !' . b:check<CR> +nnoremap <buffer> <silent> + \ <LocalLeader>c + \ :<C-U>execute b:check<CR> " Map linter based on shell family if exists('b:is_bash') && b:is_bash - let b:lint = 'shellcheck -s bash -' + let b:lint = 'write shellcheck -s bash -' elseif exists('b:is_ksh') && b:is_ksh - let b:lint = 'shellcheck -s ksh -' + let b:lint = 'write !shellcheck -s ksh -' else - let b:lint = 'shellcheck -s sh -' + let b:lint = 'write !shellcheck -s sh -' endif -nnoremap <buffer> <silent> <LocalLeader>l - \ :<C-U>execute ':write !' . b:lint<CR> +nnoremap <buffer> <silent> + \ <LocalLeader>l + \ :<C-U>execute b:lint<CR> |