2

I have a common routine where I need to do a text substitution from the current cursor position to the end of the file. I currently count how many lines there are until the end of the file and enter it manually:

:.,.25s/old/new/

Is there something I can enter instead of the .25 to make the substitution apply from the current cursor position until the end of the file?

12

There is. For last line of a file, the address is $:

:.,$s/old/new/

See :help {address} for a fill list of possible addresses.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.