Vim how to do command on current line plus 1 2 etc lines

Vim how to do command on current line plus 1 2 etc lines



.,+1s/^/text/ #command on one line
.,+2dd #command on two lines
.,+3>> #command on three lines

So the syntax is
.,+{number of lines}{vim command}

Comments

Popular posts from this blog

Vim vi how to reload a file your editing