User Tools

Site Tools


software:cli:vim:searchreplace
  1. Change occurrence of a word by another from the line to the end of the file
    :.,$s/word/another/g
  2. add a character at the beginning of lines
    :13,37s/^/%/

    here on line 13 to 37 we add '%' at the beginning

  3. Reference: Search and replace
software/cli/vim/searchreplace.txt · Last modified: 2021/12/29 21:09 by warnaud