diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-08-02 11:34:06 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-08-02 11:34:06 +1200 |
commit | 5e5f1535ae9645bc10b3d26cea66e4bac5625d7a (patch) | |
tree | 5a55963c9ddfe8c3d3715a2370d2defe7fa0e06a /vim/vimrc | |
parent | Use \! instead of \@ for line-execute (diff) | |
download | dotfiles-5e5f1535ae9645bc10b3d26cea66e4bac5625d7a.tar.gz dotfiles-5e5f1535ae9645bc10b3d26cea66e4bac5625d7a.zip |
Round out execution mappings
We'll clobber "z for now. I might rewrite this to be functional at some
point, but I do rather like that these all work with vim-tiny.
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -316,8 +316,14 @@ nnoremap <Bslash><Delete> :bdelete<CR> " \INS edits a new buffer nnoremap <Bslash><Insert> :<C-U>enew<CR> -" \! executes the current line with 'shell' -nnoremap <Bslash>! :!<C-R>=getline('.')<CR><CR> +" Execution mappings; each of these clobbers register z + +" \@ executes line in normal mode +nnoremap <Bslash>@ g^"zy$@z +" \: executes line in command mode +nnoremap <Bslash>: g^"z:<C-R>z<CR> +" \! executes line with 'shell' +nnoremap <Bslash>! g^"zy$:!<C-R>z<CR> " If we're running NeoVim, source some extra configuration if has('nvim') |