aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-29 13:57:03 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-29 13:57:03 +1200
commit91b69d6ba0b1da81ed5e46419dc8dd36bb09005c (patch)
tree4b75a7a9e6c75c87b32dd7b7292f49e0fa1650a5
parentCompact 'wildignore' setting a bit (diff)
downloaddotfiles-91b69d6ba0b1da81ed5e46419dc8dd36bb09005c.tar.gz
dotfiles-91b69d6ba0b1da81ed5e46419dc8dd36bb09005c.zip
Adjust insert mode CTRL-L mapping
-rw-r--r--vim/vimrc8
1 files changed, 3 insertions, 5 deletions
diff --git a/vim/vimrc b/vim/vimrc
index f54b20db..2d385e5f 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -250,13 +250,11 @@ endif
" Map double Ctrl-K in insert mode to search digraph names
imap <C-K><C-K> <Plug>(DigraphSearch)
-" Stack normal/visual/select Ctrl-L to clear search highlight
-nnoremap <silent> <C-L> :<C-U>nohlsearch<CR><C-L>
+" Stack Ctrl-L to clear search highlight, make it work in insert mode too
+nmap <silent> <C-L> :<C-U>nohlsearch<CR><C-L>
+inoremap <C-L> <C-O><C-L>
vnoremap <silent> <C-L> :<C-U>nohlsearch<CR>gv<C-L>
-" Make Ctrl-L work in insert mode too; good for choppy terminals
-inoremap <silent> <C-L> <C-O>:redraw<CR>
-
" Remap normal/visual & and g& to preserve substitution flags
nnoremap <silent> & :&&<CR>
xnoremap <silent> & :&&<CR>