One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com
Using 89% of the same design the blog had in 2001.
FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike,
always wear white.
As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green.
The ex command g is very useful for acting on lines that match a pattern. You can use it with the d command, to delete all lines that contain a particular pattern, or all lines that do not contain a pattern.
For example, to delete all lines containing "profile" (remove the /d to show the lines that the command will delete):
This will find everything but the regular expression you have specified. For example, if we want to find all the lines not containing the word 'foo', simply do:
/^\(\(.*foo.*\)\@!.\)*$
Just yesterday, I posted a comment on SO agreeing with a guy who said, "If you're a programmer who edits a lot of text, then it's important to learn an A Serious Text Editor." Couldn't be more right. Here's my 2¢ follow-up.
You had me at, "If you're a programmer who
edits a lot of text, then it's important to learn an A Serious Text
Editor." The worst part is that it seems impossible to learn two (much
less more) inside and out, almost by definition. You're studying edge
cases at some point, and the knowledge of how to accomplish Task X in
one doesn't usually translate. And there's always things I do in
"fringe" editors -- I still use JEdit for JTidy, Code2HTML, to search
multiple files, eg. Your main is a roll of the dice, and there's no
silver bullet, but yes, absolutely learn one and play with many. ;^)
Random addition: I'm behind a long post on why I think UTF-8 is really useful. Before I actually walked myself into an ASCII corner, it seemed like an insane hack. Now I think there's enough practical benefit it might be useful.
The postings on this site are [usually] my own and do not necessarily reflect the views of any employer, past or present, or other entity. About Our Author