Vi/Vim tips – Delete Lines
1.) Delete present line
Goto the line you want to start delete, press
Esc dd # Will delete present line
2.) Delete from line 1 to end of line.
:1,$ del # Delete from line 1 to EOL
3.) Delete from present line to end of line.
:.,$ del # Delete from present line to EOL
or
Goto the line you want to start delete, press
Esc d Shift g # Will delete all the lines from present line to EOL
. -> present line
1 -> line 1
$ -> End of Line
del -> Delete
In this blog, I'll share my knowledge, discovery and experience related to IT and administering Linux. Most articles on this site are related to News, Review, Tips, My Life journal and many more. To find out more about me, click




