Quick Vi Tip

If you need to delete massive amounts of text in Vi try these next time:

<d><G> deletes everything below the cursor

<d><1><G> deletes everything above the cursor.

<d>/foo deletes everything till the next occurence of foo

And finally:

<m><a> and <d><`><a> deletes everything from your cursor to where you placed the a mark.

Some of these things really come in useful, every once in a while.

[tags]vi, vim, tips, linux, editor, keystrokes[/tags]

This entry was posted in sysadmin notes and tagged . Bookmark the permalink.



2 Responses to Quick Vi Tip

  1. onur TURKEY Internet Explorer Windows says:

    thank you

    Reply  |  Quote
  2. Medi Montseri UNITED STATES Mozilla Firefox Linux says:

    I like the Allman style as it presents a better visual cue of the code flow. Given today’s volume of code, we software engineers need a higher level of inspection to warp our head around a code. Particularly large body of code.

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *