Created
June 10, 2016 13:43
-
-
Save scajanus/a105360a6b4cb6bd8dbbead35eb05f60 to your computer and use it in GitHub Desktop.
Make * and # first highlight, then move cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nnoremap <expr> * @/=='\<'.expand('<cword>').'\>' ? '*' : ":let @/='\\<'.expand('<cword>').'\\>'<CR>" | |
| nnoremap <expr> # @/=='\<'.expand('<cword>').'\>' ? '#' : ":let @/='\\<'.expand('<cword>').'\\>'<CR>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment