Wednesday, September 21, 2011

deleting everything but pair of certain lines

Hi,


from a xml config file (rc.xml, openbox) and its old version before
the update to openbox 3.5.0 i have a diff.

This diff says, that a lot of keywords have changed.

the accorindg lines looks like this

this some other unchaged stuff
- this is a line with the OLDKEYWORD
+ this is a line with the NEWKEYWORD
this some other unchaged stuff


I tried a g/blurb/d kind of command,
which nearly deletes all of the file, but after
undoing the deletion, all according lines where
correctlz highlighted (via hlsearch)

the expression was:
g!/^-.*\n+.*$/d

I am asking myself...what did I wrong here so badly

thank you very much for any help in advance!
Best regards
mcc


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: