Skip to content

CLI

Terminal

  • cd, clear
  • mkdir dir_name
  • vim fileName.txt // create file and open it
  • touch fileName.txt // create empty file
  • grep “regex_pattern” // search for some regex pattern in the file
    • -R for recursive search
  • sed “regex_replace_pattern” fileName // replace content of file with regex

Vim Motions

command mode

  • % - create file
  • d - create dir
  • space+pv - explorer
  • v - view mode
  • a, i, o - insert mode
  • : - escape mode
  • space+pf - search in project files
  • ctr+p - search in git only files
  • space+ps - search inside files
  • u - undo
  • y - copy to bufer
  • p - paste from buffer
  • space+y - copy to clipboard
  • cmd+v - paste from clipboard

view mode

  • = - format
  • esc - command mode

insert mode

  • ctr+c, ctr+[, esc - command mode
  • ctr+o - one command command mode

escape mode

  • esc - command mode
  • :q - quit
  • :w -save
  • :qw - quit+save
  • :Ex - explorer
  • :sp - split view
  • :so - source(activate) current file