Linux-Noob Forums

Full Version: vi/vim tips
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Consult [/url][url=http://lagmonster.org/docs/vi2.html]http://lagmonster.org/docs/vi2.html for more, I found its a pretty good reference.

 

However one option seems understated. If you want to delete everything from the cursor to the end of the file you'd do (while out of INSERT mode):



Code:
dG




The d tells vi to delete, the G tells vi to go to the end of the file.


My favoured vim tip is:

 



Code:
gq




 

Which reformats the line :P

Nice post Ritter