Vim Tip: Select everything

vim_editor There’s an easy way to select the whole contents of the document: “ggVG”. May seem like a lot at first glance but let’s review it part by part:

gg: Go to the beggining of the document
V: Enter visual mode
G: Go to the end of the document

Easy, isn’t it? Now you can press any other command to copy, delete or whatever you like.

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