On 2016-12-14 04:34, Slartibartfast wrote:
> > :nnoremap * :let @/='\<lt>'.expand('<lt>cword>').'\>'<cr>
>
> Wow, what on earth does that mean?
>
> I tried it all the same and yes it does indeed work in gVim but I
> have no idea why.
It remaps the "*" key to run the ex command that follows.
let @/= " assign to the search register
'\<lt>' " a literal \<
. " followed by
expand(...) " the current word under the cursor
'<lt>cword>' " (need to escape the opening < sign)
. " followed by
'\>' " a literal \>
<cr> " actually execute the assignment
> I also tried it in Notepad++ and Android Studio (with their
> respective Vim plugins) and unfortunately it doesn't for either of
> them.
Can't speak to the vim-nature of non-vim. Sorry ;-)
-tim