Daily Vim

cc – change whole line
c$ change to end of line
:%s/this/that/gc  –  Change ‘this’ to ‘that’ globally in the file and on the line & confirm each
:1,100 s/this/that  –  Change this to that for lines 1 through 100
:e!  –  Reset all edits made in current file
vi + [file]  –  Edit and go to end of file
vi +/string [file]  –  Edit and go to string

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s