Thursday, March 14, 2013

vi replace a word

If all pick words need to be changed to f except in the first line.
1) Put the cursor on first pick.
2) Press * to search for the next occurrence.
3) Type ciw (change inner word) then f then press Escape.
4) Press n (move to next occurrence) then . (repeat change).
Repeat last step. source: http://vim.wikia.com/wiki/Search_and_replace_the_word_under_the_cursor

No comments:

Post a Comment