Assorted Handy vim Commands, Part 1 David Nash January 28, 2009 vim, xhtml 1 CommentTo reverse the order of lines, eg 1-5 : 1,5 g/^/m0 For example,one two three four fivebecomesfive four three two oneTo remove blank lines : %g/^$/dDelete all lines that don’t contain “string” : %v/string/d
GageNovember 13, 2009 at 5:54 pmNice! I love vim, I wish you would explain how the lines switching one works but ah well.Part 2 coming? Log in to Reply
Comments 1
Nice! I love vim, I wish you would explain how the lines switching one works but ah well.
Part 2 coming?