415 words
2 minutes
Vim Cheat

Vim Cheat Sheet (rtorr.com)

Cheat Sheet (Learn Vim VsCode Ext)

basic motion#

           ↑
     ← h j k l →
         ↓

恢复 Normal mode <ESC> 、 <CTRL-C> 或 <CTRL-[>

Cheat for Windows shortkey

  • <CTRL-C> 不再复制,而是返回正常模式。我们在 Vim 中用于复制的命令要简洁得多: y (用于复制)
  • <CTRL-V> 不再粘贴,而是将您带入视觉块模式。同样,我们在 Vim 中用于粘贴的命令不太冗长:只需一个 p (用于粘贴)。
  • <CTRL-F> 不再允许您搜索,而是允许您将屏幕向前滚动一页。(front,向前),我们在 Vim 中用于搜索的命令更加触手可及: /{term-i-am-searching-for} 。

Move Fast Word By Word#

  • w (word) move forward to the beginning of the next word

  • e (end) move forward to the end of the next word

  • b (back) move backword to the beginning of the previous word

  • ge move backword to the end of the previous word


  • W (Word) move forward to the beginning of the next WORD

  • E (End) move forward to the end of the next WORD

  • B (Back) move backword to the beginning of the pervious WORD

  • gE move backword to the end of the previous WORD

Move To A Special Character In Line#

  • f{character} (find) move forward to the next occurrence of a character in a line

  • t{character} (until) move forward to the next occurrence of a character and place cursor just before it in a line


  • F{character} (Find) move backword to the next occurrence of a character in a line

  • T{character} (unTil) move backword to the next occurrence of a character and place cursor just before it in a line


  • ; go to next occurrnece of {character}

  • , go to pervious occerrence of {character}

Move Horizontally Extremely#

  • 0 move to the first character of a line

  • ^ move to the first non-blank character of a line

  • $ move to the end of a line

  • g_ move to the non-blank character at the end of a line

Move Faster Vertically#

  • } jumps entire paragraphs downwards

  • { jumps entire paragraphs upwards

  • CTRL-D move down half a page by scorlling the page

  • CTRL-U move up half a page by scorlling the page

  • /{pattern} Search for {pattern} forward. {pattern} is regex

  • ?{pattern} Search for {pattern} backword.


  • / repeat last search forward

  • ? repeat last search backword


  • n go to next match

  • N go to pervious match

Vim Cheat
https://tamako-blog.netlify.app/posts/vim-cheat/
Author
Xrafece
Published at
2025-05-10
License
CC BY-NC-SA 4.0