.:: USAGE ::. RIGHT: Move the cursor right by 1 position. LEFT: Move the cursor left by 1 position. UP: Move the cursor up by 1 line (the cursor's horizontal position should be preserved, or move to the end of the line if the line is shorter). DOWN: Move the cursor down by 1 line (the cursor's horizontal position should be preserved, or move to the end of the line if the line is shorter). ^ (or 0): Move the cursor to the beginning of the line. $: Move the cursor to the end of the line. w: Move the cursor to the end of the word to the right of the cursor (if the cursor is at the end of a word, move to the end of the next word). b: Move the cursor to the beginning of the word to the left of the cursor (if the cursor is at the beginning of a word, move to the beginning of the previous word). gg: Go to the beginning of the file. G: Go to the end of the file. NG: Go to line number N. For example, 10G moves to the 10th line. PG_UP: Move up one screen. PG_DOWN: Move down one screen. x: Delete the character after the cursor. diw: Delete the word under the cursor, including the space to the right. dd: Cut the current line. yy: Copy the current line. yw: Copy the word under the cursor. p: Paste after the cursor. /text: Search for the string text from the cursor to the end of the file. If the string is found, move the cursor to the beginning of the string. ?text: Search for the string text from the cursor to the beginning of the file. If the string is found, move the cursor to the beginning of the string. n: Repeat the search. N: Repeat the search in the reverse direction. i: Insert text before the cursor. I: Move to the beginning of the line and start inserting text. A: Move to the end of the line and start inserting text. S: Delete the contents of the line and start inserting text. r: Replace one character under the cursor. o filename: Open the file filename. x: Save the current file and exit. w: Save the current file. w filename: Save to filename. q: Quit. If the file has been modified, quitting is only possible with q!. q!: Quit without saving. wq!: Save the current file and quit. number: Go to line number. h: Display help for commands.