2022年7月15日 星期五

Search selected text in vim

 Just note down issues i faced in vim.

Search word under the cursor - * or # for backward/forward, respectively.

Search selected text in visual mode - 

    y (yank the selected text into " register by default)

    /  (enter search mode)

    (\ V) (can skill, it's optional. enter "very no magic" mode*)

    Ctrl + r " (paste text from " register)

    Enter (go!)


Reference: https://superuser.com/questions/41378/how-to-search-for-selected-text-in-vim


沒有留言:

張貼留言