Monday, September 12, 2011

Vim search and replace from current location to end of file

Instead of searching and replacing the entire file with...


Try inserting ".," just after the colon. This means "from current position to end of file".


The comma actually specifies a range to make the substitution, from left and right of comma. For example...


...makes the substitutions on lines 5 through 10.

No comments: