editor - vim - search current line equivalent to search current word -


is there equivalent search string in current line similar * or # search current word?

no, it's easy make it.

:nnoremap <silent> <leader>f :execute '/\v\^' . escape(getline('.'), '\\/') . '\$'<cr> 

this should give \f (or whatever remapped leader instead of backslash) should start search next instance of current line.


Comments

Popular posts from this blog

javascript - Add class to another page attribute using URL id - Jquery -

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -