“Find next” in Vim

前端 未结 7 1746
野性不改
野性不改 2021-01-29 17:10

To search forward in Vim for cake, I\'d type /cake, but the cursor jumps to the first match when I press return. Is there a Vim command analogo

7条回答
  •  你的背包
    2021-01-29 17:38

    The most useful shortcut in Vim, IMHO, is the * key.

    Put the cursor on a word and hit the * key and you will jump to the next instance of that word.

    The # key does the same, but it jumps to the previous instance of the word.

    It is truly a time saver.

提交回复
热议问题