http://stackoverflow.com/questions/1616753/make-emacs-semant...
For refactoring, that's just an advanced text across many files manipulation feature, and emacs certainly can do it, but you might have to work on your .emacs file.
The numerous other things sound like either things you can do in gdb or valgrind, or again just advanced text search/editing.
Now all of this is not elegantly pulled together. You need to create this for yourself, make all these tools work together by developing a development environment for yourself. But once you do, you may be surprised just how elegantly everything works together.
Re-factoring is text editing, if you consider parsing to be advanced text editing(which it is not). Consider a class Foo implementing method foo, and a class Bar implementing a method of the same name foo. When I am renaming Foo.foo to Foo.bar, a refactoring tool will rename based on the semantics.
Renaming manually will always require looking through all occurrences, compared to clicking a couple of buttons in Eclipse and being assured it renamed all occurrences without any false positives or negatives.
Also, the nature of dynamic languages make it harder to refactor:
class Foo:
def foo():
pass
class Bar:
def foo():
pass
def a_func(arg):
arg.foo()
Now, in arg.foo, arg can be an instance of Foo, or Bar, or Baz...In a large codebase, manually doing it will be a night mare.I mostly use vim, linux and dynamic languages. But that doesn't change the fact that Eclipse/Java is leaps and bounds ahead when we are talking re-factoring.
Also, I use rope for Python. Though it mitigates most of the warts, it can't mitigate the issue in the snippet above. There is an `unsure` mode which renames when unsure, but that's not a smart thing to do on a large codebase.
See ctags/etags, cedet, ropemacs (refactoring Python), xrefactory (refactoring C and C++), wrangler (refactoring Erlang), etc.
People kludge them to fit all the time—look how older ctags implementations worked, after all—but it reminds me of a guy I who would write paragraphs so that each sentence had its own "line" and relied on implicit word wrap in LaTeX, HTML and the like to format it for human consumption. He did this so it would work better with tools like diff, patch, and version control in general. I thought "hey, worth a shot", tried it, and found it too clumsy for me during the writing process and abandoned it soon after.
git supports a --color-words option which is quite handy for text.
> I thought "hey, worth a shot", tried it, and found it too clumsy for me during the writing process and abandoned it soon after.
use auto fill and don't manually break lines :)
Using vim (or sed for whole directories of files) you can do the same thing using a search and replace regex.
in vim:
:%s/<find>/<replace>/gcHope you have very good unit tests.
Code review happens anyway, automated refactor or not
And, yes, it is very nice. Eclipse comes close with Java but, last I tried Vim and Emacs refactoring plugins, they were nowhere near as good or even very discoverable/usable).
* no autocomplete... On huge projects that are not based on some predefined framework structure (think rails) this results in a lot of "what was the parameter order of that function again or how was it even called ?"
* no easy refactoring. In VS i love how i can just hit F2 on a method name, rename it, VS shows me all the places where it will rename it and pressing OK. This works flawless everytime and makes refactoring so much more painless than working with a scripting language and a text-editor only
+ numerous other things like looking up where certain methods get called, where they are defined etc.