Skip to main content

0107 | Text Editors

Text Editors

Text Editors | nano

  • nano example.txt
  • '^' --> [ctrl] key
    • like ^G for Get Help
  • 'M' --> [alt] key
    • like M-E for Redo
  • disable help mode --> M-X
  • ^C --> to know where you are in the document
  • M-/ --> move to the end of the file
  • M-\ --> move to the top of the file
  • M-U --> undo a change
  • M-E --> redo a change
  • select text --> M-A
  • copy selected text --> M-^
  • paste text --> ^U
  • cut text --> select text --> ^K --> ^U to paste it
  • search for text --> ^W
    • next occurrence = M-W
    • prev occ. = M-Q
  • save file -- ^O
  • exit editor -- ^X

Text Editors | vim

  • is a modal editor -- command; input; last line
  • searching -- /
    • next match -- n
    • prev match -- N
  • moving to a specific line
    • :<line-number> like :2
  • last line of the file
    • :$ or G