From 5e5f1535ae9645bc10b3d26cea66e4bac5625d7a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 2 Aug 2018 11:34:06 +1200 Subject: 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. --- vim/vimrc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc index d10309da..d19e55d8 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -316,8 +316,14 @@ nnoremap :bdelete " \INS edits a new buffer nnoremap :enew -" \! executes the current line with 'shell' -nnoremap ! :!=getline('.') +" Execution mappings; each of these clobbers register z + +" \@ executes line in normal mode +nnoremap @ g^"zy$@z +" \: executes line in command mode +nnoremap : g^"z:z +" \! executes line with 'shell' +nnoremap ! g^"zy$:!z " If we're running NeoVim, source some extra configuration if has('nvim') -- cgit v1.2.3