Vim: delete all but the current line

Viewed 264

I know this is a bit of vim-golfing, but I am interested in other opinions / ideas. Sometimes I have to edit a file and to delete all but the current line. My go to solution involves ex mode :t0|2,$d

These are as many as 8 keystrokes! (I am aware that this command can be mapped easily to some convenient combination on the keyboard.) Other suggestions, ideas?

2 Answers
Related