Oliver's Tips'n'Tricks
From Wikiid
Revision as of 14:14, 3 May 2009 by SteveBaker (Talk | contribs)
Stuff for Oliver:
The MkGallery program
"vi" commands
Bulk substitution of text:
:1,$s/oldtext/newtext/g
The ':' puts you into commandline mode, the 's' means 'substitute'. If either oldtext or newtext contains a slash then you can use some other character instead, eg:
:1,$s!oldtext!newtext!g
...the 'g' at the end means "change every occurrance on the line" - if you leave it off, it'll replace only the first occurrance of 'oldtext' on each line. The '1,$' part means "from line one to the last line in the file", you could alternatively say '10,20' or something.\