diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-11-23 14:26:08 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-11-23 14:26:08 +1300 |
commit | 167b949d8bc1131a202ea1379cbf0deb056f9fbe (patch) | |
tree | 6e8582ed3493808a6ade033f41c69c6bab0a9726 /vim/vimrc | |
parent | Merge branch 'release/v7.18.0' into develop (diff) | |
download | dotfiles-167b949d8bc1131a202ea1379cbf0deb056f9fbe.tar.gz dotfiles-167b949d8bc1131a202ea1379cbf0deb056f9fbe.zip |
Refine "sticky star" mapping
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1496,8 +1496,12 @@ sunmap <Leader>& map <Leader>7 <Leader>& ounmap <Leader>7 sunmap <Leader>7 -"" Leader,*/8 is sticky-star: search, highlight, but don’t move -nnoremap <silent> <Leader>* *N +"" Leader,*/8 is "sticky star": +"" - Set search string to word under cursor +"" - Show search highlighting if it's enabled +"" - Don't move the cursor +nnoremap <silent> <Leader>* + \ :<C-U>let @/ = expand('<cword>')<CR>:let &hlsearch = &hlsearch<CR> nmap <Leader>8 <Leader>* "" Leader,` opens a scratch buffer, horizontally split nnoremap <silent> <Leader>` |