Vim

Vim is a popular text editor used in the command line interface:

  • i: Switch to insert mode, allowing you to insert text.
  • Esc: Exit insert mode and return to command mode.
  • :w: Write the current file to disk.
  • :q: Quit Vim.
  • :q!: Quit Vim without saving changes.
  • :wq: Write the current file to disk and quit Vim.
  • yy: Copy the current line.
  • p: Paste the copied line.
  • dd: Delete the current line.
  • u: Undo the last change.
  • Ctrl + r: Redo the last change.
  • /search_term: Search for a specific term in the file.
  • :s/old_text/new_text/g: Replace all occurrences of 'old_text' with 'new_text' globally in the file.