diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-23 11:19:58 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-23 11:49:42 +1200 |
commit | 8b6eae719fee4302796817e040d992629b456954 (patch) | |
tree | 06691962027ee76b09a2cdb3eb20c1b1b6a9dc2c /vim/vimrc | |
parent | Adjust more .vimrc comments and whitespace (diff) | |
download | dotfiles-8b6eae719fee4302796817e040d992629b456954.tar.gz dotfiles-8b6eae719fee4302796817e040d992629b456954.zip |
Handle visual mode better in Vim mappings
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -175,17 +175,26 @@ if has('windows') endif -" Rebind normal <Space> to scroll down a page +" Rebind normal, visual <Space> to scroll down a page nnoremap <Space> <C-F> +if v:version >= 700 + xnoremap <Space> <C-F> +endif -" Rebind normal & to preserve substitution flags +" Rebind normal, visual & to preserve substitution flags nnoremap <silent> & :<C-U>&&<CR> +if v:version >= 700 + xnoremap <silent> & :&&<CR> +endif " Stack insert Ctrl-C to undo the escaped insert operation inoremap <C-C> <C-C>u -" Stack normal Ctrl-L to clear search highlighting before redraw +" Stack normal, visual Ctrl-L to clear search highlight before redraw nnoremap <silent> <C-L> :<C-U>nohlsearch<CR><C-L> +if v:version >= 700 + xnoremap <silent> <C-L> :<C-U>nohlsearch<CR>gv<C-L> +endif " Cycle through argument list nnoremap [a :<C-U>previous<CR> |