Skip to main content

motions

  • () "move to the beginning or end of a sentence
  • {} "move to the beginning or end of a paragraph
  • gf "on a file name, opens the file in a new buffer
  • g; "goes to the last place where a modification occurred (change list)
  • g, "goes to the next place where a modification occurred (change list)
  • gg "go to beginning of file
  • G "go to end of file
  • 0 "go to the beginning of line
  • $ "go to the end of a line
  • ^ "go to the first occurrence of text in line
  • g_ "go to the last occurrence of text in line
  • H "move cursor to the top of the currently visible page
  • M "move cursor to the middle of the currently visible page
  • L "move cursor to the bottom of the currently visible page
  • c-d "page down
  • c-u "page up
  • c-e "scroll down one line
  • c-y "scroll up one line
  • gp "Just like "p", but leave the cursor just after the new text
  • gP "Just like "P", but leave the cursor just after the new text
  • t <char> "move the cursor just before the character indicated
  • <n> t <char> "move the cursor just before the nth occurrence of the "character indicated
  • f <char> "move the cursor on the character indicated
  • <n> f <char> "move the cursor on the nth occurrence of the "character indicated
  • /<string> "move the cursor to the indicated string
  • <n>/<string> "move the cursor to the nth occurrence of the indicated "string
  • [[ "move the cursor to the previous textual section
  • ]] "move the cursor to the next textual section

We can also move the window with respect to the cursor, e.g.,:

  • zz "the cursor will be at the center of the screen
  • z. "the cursor will be at the center of the screen and the cursor will be "put at the beginning of the line
  • zt "scroll the screen so the cursor is at the top
  • zb "scroll the screen so the cursor is at the bottom