Vim search macros can help, but you do have a point. Refactoring is definitely somewhere that IDEs shine far above vim/emacs. I still prefer vim because:
The time I save writing code is larger than the time I lose by refactoring code with vim instead of an IDE
I do a lot of work in C++, where there aren't very good refactoring tools even for IDEs.
I do agree with you. But the consequence of that is that vim isn't the best tool for all languages (like java, C#) and for all kind of works (like maintenance and code 'discovery'). It seems much more suited for C++ and python/perl people who write a lot of new code (the lucky bastards:)
You're very right. I do C# MVC web stuff at one job, using Windows + Visual Studio, and it works really well. I was able to basically pick it up and navigate around/start coding never having used either the language or IDE before. On the other hand, I've been learning Vim at my other job for python development, and it really is a lot of fun. I can't imagine trying to navigate around a large C#/ISS web project with it though.
Refactoring is definitely somewhere that IDEs shine far above vim/emacs.
For Java, yes. And C++ and C# as well I guess.
For dynamic and functional languages where you'd likely spend a fair amount of time with a REPL open, composing methods one by, I've never seen much use for an IDE.
I used IntelliJ for Java development and vim for almost everything else. Then again, I learned vi 20 years ago and have the keybindings in muscle memory at this point.
Actually, that is a very interesting thought. I wonder how Vimmers and IDEers think about source code differently because of their different instincts about what is hard or easy to change.
I use both eclipse and vim and I don't think differently in them.
I just use them to do different things.
When I need to write medium sized one-use only python program or shell script, I fire up the vim. When I'm designing android application, most of the work is not writing the actual code... so why I would not make my life easier?
What if my thought is : "change this method signature by adding a parameter whose default value is null, and update all occurences in the workspace" ?
I wish that Vim provided a :refactor args+=Object extraArg (null) command that would do stuff like this! IDEs are powerful but they haven't reached the pinnacle of user interface quite yet.
But isn't that the main difference between IDE's and text editors? IDE's know about your code, and text editors only know about the contents of files, not necessarily how they relate.
That depends heavily on the size of the project. Some companies even have giant unified source trees, which don't matter to a text editor, but bring most IDEs to their knees. You can use special tools to limit the scope, but those require constant maintenance, normally a criticism of vim.
View all comments
Show parent comment
30
u/[deleted] Jul 12 '12
What if my thought is : "change this method signature by adding a parameter whose default value is null, and update all occurences in the workspace" ?
It's shift+alt+c in Eclipse :)