On Thursday, July 11, 2013 4:05:20 PM UTC+2, Matteo Cavalleri wrote:
> i've added this map to my vimrc (copied from somewhere):
>
> nnoremap * :let @/='\<<C-R>=expand("<cword>")<CR>\>'<CR>:set hls<CR>
>
> it higlights the word under the cursor but doesn't jump to the next match.
> it's working fine, but i discovered a little problem: it doesn't add the word
> to the search history, like the original '*' does. is there a way to fix this
> problem? i've googled a bit but haven't found anything useful...
I use a different approach. This clobbers the x and y marks though.
nnoremap <silent> * :keepjumps normal! mxHmy`x*'yzt`x<CR>
Best,
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.