This document provides a summary of keyboard shortcuts for navigating and editing text in Vim. It details shortcuts for moving the cursor within lines and files, finding and replacing characters, deleting and changing text, and entering and exiting insert mode. Common shortcuts include hjkl for cursor movement, w/b/e to move by word, gg/G for start/end of file, and i/a for insert before/after cursor.
This document provides a summary of keyboard shortcuts for navigating and editing text in Vim. It details shortcuts for moving the cursor within lines and files, finding and replacing characters, deleting and changing text, and entering and exiting insert mode. Common shortcuts include hjkl for cursor movement, w/b/e to move by word, gg/G for start/end of file, and i/a for insert before/after cursor.
This document provides a summary of keyboard shortcuts for navigating and editing text in Vim. It details shortcuts for moving the cursor within lines and files, finding and replacing characters, deleting and changing text, and entering and exiting insert mode. Common shortcuts include hjkl for cursor movement, w/b/e to move by word, gg/G for start/end of file, and i/a for insert before/after cursor.
This document provides a summary of keyboard shortcuts for navigating and editing text in Vim. It details shortcuts for moving the cursor within lines and files, finding and replacing characters, deleting and changing text, and entering and exiting insert mode. Common shortcuts include hjkl for cursor movement, w/b/e to move by word, gg/G for start/end of file, and i/a for insert before/after cursor.
j moves the cursor down k moves the cursor up l moves the cursor right w moves the cursor forward one word b moves the cursor to the beginning of the word e moves the cursor to the end of the word gg moves the cursor to the beginning of the file G moves the cursor to the end of the file 0 moves the cursor to the beginning of the current line $ moves the cursor to the end of the current line
Key What it does
"find", this command moves the cursor to the next {char} on the f {char} current line reverse "find", this command moves the cursor to the previous F {char} {char} on the current line "till", this command moves the cursor just before the next {char} on t {char} the current line reverse "till", this command moves the cursor just after the previous T {char} {char} on the current line ; repeat the last search in the same direction , repeat the last search in the opposite direction
x delete the character under your cursor
delete, this command needs to be combined with a subject that d {subject} defines what it deletes. dw deletes from the cursor position to the next word deletes from the cursor position to the beginning of the current db word (or to the beginning of the previous word, if already at the beginning of a word) u undo last action ctrl+r redo last action
"change", this command needs to be combined with a subject that
c defines what it changes. Similar to the dcommand i "insert", puts you into insert mode just before your cursor a "append", puts you into insert mode just after your cursor Esc exit insert mode
Key What it does
when in insert mode, type j k quickly to switch back to normal jk mode. Ctrl+c this key combo also escapes from insert mode puts you into insert mode just before the first non-whitespace I character of the current line A puts you into insert mode at the end of the current line
Things to know for this exercise
Key What it does r replace the character under the cursor Esc exit operator pending mode Ctrl+c exit operator pending mode dd shortcut command to delete the current line