Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 611 Bytes

File metadata and controls

24 lines (21 loc) · 611 Bytes

to search/replace over file with confirmation:

:%s/find/replace/gc

  • % means the whole file
  • g means replace all occurences on a line
  • c confirm each substitution

replace in a range from mark to current line

  • go to first line of range
  • press ma to set the a mark
  • go to last line of range :'a,.s/foo/bar/
    • 'a marked line
    • , range separator
    • . current line
    • s start of substitution

Refresh each buffer open (eg. after git checkout)

:bufdo :e!

  • bufdo do over each buffer
  • e[dit]! start all over again

Show cursor position and filename

CTRL-g or g CTRL-g or set ruler