“Find next” in Vim

前端 未结 7 1539
野性不改
野性不改 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:46

    It is n for next and N for previous.

    And if you use reverse search with ? (for example, ?cake) instead of /, it is the other way round.

    If it is installed on your system, you should try to run vimtutor command from your terminal, which will start a tutorial of the basic Vim commands.

    Rob Wells advice about * and # is also very pertinent.

提交回复
热议问题