- to replace first occurrence of OLD to NEW on current line
- :s/OLD/NEW
- to replace all occurrence of OLD to NEW on current line
- :s/OLD/NEW/g
- to replace all occurrence of OLD to NEW between two line numbers (# are the line numbers)
- :#,#s/OLD/NEW/g
- to replace every occurrence of OLD to NEW on current file
- :%s/OLD/NEW/g
No comments:
Post a Comment