Skip to content

Latest commit

 

History

History
57 lines (33 loc) · 1.51 KB

.cheatsheet.md

File metadata and controls

57 lines (33 loc) · 1.51 KB

Vim

Navigation

  • b/B: jump to the beginning of the word backwards

  • e/E: jump to the end of the word

  • ge/GE: jump to the end of the word backwards

  • w/W: jump to the next word (may jump to punctuation)

  • f{character}: Move to the next occurrence of a character in a line

  • F{character}: Find the previous occurrence of a character (behind the cursor) in a line

  • t{character}: Move just before the next occurrence of a character in a line

  • T{character}: Find just before the previous occurrence of a character (behind the cursor) in a line

  • ";": go to the next occurrence of the character

  • ",": go to the previous occurrence of the character

  • 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_: Moves to the non-blank character at the end of the line

  • '}': Jumps entire paragraph downwards

  • '{': Jumps entire paragraph upwards

  • CTRL-D : Moves down half a page

Search (can also be used with regexes)

  • /{pattern}: Search forward inside a file
  • ?{pattern}: Search backwards inside a file
  • n: Jump to the next match
  • N: Jump to the previous match

Semantic moves

  • gd: Jump to the definition of what is under the cursor
  • gf: Jump to a file inside an import
  • CTR-O: Go back to previous cursor position

File Navigation

  • gg: Go to the top of the file
  • G: Go to the end of the file
  • {line}gg: Go to the specific line
  • %: Jump to matching ({[]})