Re:Go Replace - simple and fast search and replace tool for ...
by piranha on Wednesday May 22, 2013 @06:52AM
(#5749939)
Well you see... It's in Python, which breaks the deal for me (I despise slow startup). But interactive mode sounds interesting, that's something I'll consider implementing.
Re:Go Replace - simple and fast search and replace tool for ...
by pekk on Wednesday May 22, 2013 @07:44AM
(#5750097)
By slow startup do you mean 0.01s of wall time? This sounds more like a prejudice than a decision with a strong technical basis.
Re:Go Replace - simple and fast search and replace tool for ...
by piranha on Wednesday May 22, 2013 @07:54AM
(#5750132)
By slow startup I mean that 0.1s is the fastest small Python program using optparse, os, sys, re will start up on my system (i7 2.0, ssd). Search and replace tool will be slower. I constantly get 0.02s-0.3s results from 'gr' on my small-to-medium repositories (up to ~80k sloc). 'ack' takes more than a second usually.
Also it was written when I had HDD (not SSD) and codebase was on an encrypted image. It made enormous difference to me.
Re:Go Replace - simple and fast search and replace tool for ...
by cfrss on Wednesday May 22, 2013 @08:12AM
(#5750199)
btw, here is ag, which also looks .xignore files: https://github.com/ggreer/the_silver_searcher
Re:Go Replace - simple and fast search and replace tool for ...
by piranha on Wednesday May 22, 2013 @08:15AM
(#5750209)
Yes, I've mentioned it in my post. :) It's nice, but it does not perform replaces. I could add .xignore support though.
Re:Go Replace - simple and fast search and replace tool for ...
by swah on Wednesday May 22, 2013 @07:24AM
(#5750037)
I love this little gem. I can do in seconds what takes my colleagues an hour (they generally don't know about macros, extending their editors, regexes, etc). It showed me that solving text problems outside your text editor ends up benefiting more people.
Its a little bit different from Go Replace, giving the option to drop on your editor if the current replacement can't be appied directly (this is the great feature).
It has something like automatic and manual modes, so you can check (and fix) every diff during the replacement