aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc10
1 files changed, 8 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index d10309da..d19e55d8 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -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')