Skip to content

Instantly share code, notes, and snippets.

@moelzanaty3
Created December 17, 2023 06:42
Show Gist options
  • Save moelzanaty3/d92d5d43e11b9869c6da994d4b23ecea to your computer and use it in GitHub Desktop.
Save moelzanaty3/d92d5d43e11b9869c6da994d4b23ecea to your computer and use it in GitHub Desktop.
vim binding keys to memorize it

Vim Key Binding

  • Use the hjkl keys as indicated below to move one character in any direction.
  • Moving With Words
    • w move to the next word
    • e move to the end of a word
    • b move back a word
  • Insert Mode
    • i enter insert mode before your cursor
    • a enter insert mode after your cursor
    • esc go back to normal mode
  • Inserting at Line Ends
    • I enter insert mode at the beginning of a line
    • A enter insert mode at the end of a line
    • esc go back to normal mode
  • Opening New Lines
    • o open a new line below the cursor
    • O (uppercase o) open a new line above the cursor
  • Moving to Line Ends
    • 0 move to the beginning of a line
    • $ move to the end of a line
    • _ move to the first word in a line
  • Find Motion
    • f {char} move to the next occurance of {char}
    • F {char} move to the previous occurance of {char}
    • ; repeat the last find motion.
  • Delete Operator
    • d w delete word
    • d d delete a line
    • D delete from the cursor to the end of a line
    • x delete the character under the cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment