:%s/^\(\(search text\)\@!.\)*$//g
then remove all the blank lines:
:g/^$/ d
(there's a space before the d)then sort it with:
:sort
Help came from these pages:
http://vim.wikia.com/wiki/Search_and_replace
http://www.computing.net/answers/unix/delete-blank-line-thro-vi-editor/4552.html
No comments:
Post a Comment