Linux-Noob Forums
vi/vim tips - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html)
+--- Forum: Tips and Tricks (https://www.linux-noob.com/forums/forum-59.html)
+--- Thread: vi/vim tips (/thread-1344.html)



vi/vim tips - Ritter - 2007-06-04


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.




vi/vim tips - znx - 2007-06-05


My favoured vim tip is:

 



Code:
gq




 

Which reformats the line :P




vi/vim tips - xDamox - 2007-06-05

Nice post Ritter