Home  >  Q&A  >  body text

How to quickly jump to the next space in vim

In vim, w is to move to the beginning of the next word, and e is to jump to the end of the next word
So what should I do if I want to move to the next space (including spaces and tabs)?

世界只因有你世界只因有你2712 days ago1056

reply all(4)I'll reply

  • 为情所困

    为情所困2017-05-16 16:44:33

    My knowledge of vim is limited... After thinking about it for a long time, I can't figure out how to implement a key...

    There are many kinds of two keys...such as El...(uppercase E, lowercase L)...directly meet your needs...

    Or something simpler and easier to understand... f<space> 或者 f<tab> ...

    It’s just that you have to distinguish whether you are looking for spaces or tabs...

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-16 16:44:33

    For example, there are two words now

    Hello World

    In command line mode, press 9 and press the direction key "l" in vim to jump to the Hello Wor "l"d position

    Move 9 characters to the right.

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-16 16:44:33

    The f key can jump back to the specified character
    Just type "f<space>"

    Sorry, I didn’t see the answer on the first floor has been answered.
    Then add one more thing: you can directly use search to jump to "/<space><enter>"

    reply
    0
  • PHP中文网

    PHP中文网2017-05-16 16:44:33

    In fact, vim also has a shortcut key which is the action ;(分号),这个快捷键的作用就是重复上一次find(f<sapce>t<space>F<sapce>T<space>).
    In fact, there is another comma ,是重复向前搜索的意思,但是很多人(包括我)将逗号(,)映射成了<leader>, so you can only use semicolon as a last resort (search backwards). . .

    Just f<space>一次即可,剩下的事情就交给;come on. . . One click is faster than two. . . And it's still in such a convenient position. . .

    reply
    0
  • Cancelreply