vim commands every engineer should know

vim commands every engineer should know

  • dd -> delete the current line

  • dl -> delete letter

  • dw -> delete words

  • dG -> jump to end of file

  • yy -> copy the current line

  • p -> used to paste content

  • % -> iterate through open and closing brackets

  • u -> undo a change

  • /[word] -> Search a word and then n to iterate through it

  • :%s/[search]/[replace]/g -> replace all strings

  • 0 -> jump to start of line

  • $ -> jump to end of line

  • :set nu -> show the line numbers

  • :[line_number] -> jump to a the line

  • v -> open file in a window

  • h, j, k, l: Move left, down, up, and right respectively.