diff options
-rw-r--r-- | vim/after/ftplugin/sh.vim | 4 | ||||
-rw-r--r-- | vim/after/ftplugin/vim.vim | 10 | ||||
-rw-r--r-- | vim/vimrc | 9 |
3 files changed, 14 insertions, 9 deletions
diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim index 0327db78..8468b133 100644 --- a/vim/after/ftplugin/sh.vim +++ b/vim/after/ftplugin/sh.vim @@ -44,3 +44,7 @@ nnoremap <buffer> <LocalLeader>l \ :<C-U>compiler shellcheck<CR> let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>c' \ . '|nunmap <buffer> <LocalLeader>l' + +" ,! executes line with 'shell' +nnoremap <buffer> <LocalLeader>! ^"zyg_:!<C-R>z<CR> +let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>!' diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim index 5b4d0f95..0b877178 100644 --- a/vim/after/ftplugin/vim.vim +++ b/vim/after/ftplugin/vim.vim @@ -43,3 +43,13 @@ endif nnoremap <buffer> <LocalLeader>K \ :<C-U>helpgrep <cword><CR> let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>K' + +" ,@ executes line in normal mode +nnoremap <buffer> <LocalLeader>@ + \ ^"zyg_@z +let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>@' + +" ,: executes line in command mode +nnoremap <buffer> <LocalLeader>: + \ ^"zyg_:<C-R>z<CR> +let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>:' @@ -449,15 +449,6 @@ nnoremap <Leader><Insert> :<C-U>enew<CR> " \TAB toggles 'autoindent' nnoremap <Leader><Tab> :<C-U>setlocal autoindent! autoindent?<CR> -" Execution mappings; each of these clobbers register z - -" \@ executes line in normal mode -nnoremap <Leader>@ ^"zyg_@z -" \: executes line in command mode -nnoremap <Leader>: ^"zyg_:<C-R>z<CR> -" \! executes line with 'shell' -nnoremap <Leader>! ^"zyg_:!<C-R>z<CR> - " Things I almsot always type wrnog inoreabbrev almsot almost inoreabbrev wrnog wrong |