by cletus · 11y ago · 0 comments
But take the poster's example of changing parameters. Let me tell you how I do this in IntelliJ:
1. Click anywhere between the parentheses; 2. Press Ctrl+W (context-sensitive selection) repeatedly until I have everything within the parentheses; 3. Type the new parameters.
Now some might object to the mouse use here. There is a belief that the keyboard is faster, which seems to at least in part be an illusion [1]. Anyway, (1) can be replaced by any number of keyboard navigation techniques. Incremental search tends to be my "go to".
The one big use case for vim/emacs for me is the ability to use them over SSH. That's actually pretty huge but I won't use either all the time just for that.
At the end of the day vim (and emacs) are just text editors, which is fine, but you see this limitation all the time. Regex based syntax highlighting will have funny edge cases (emacs is a little different here I know).
An IDE is built to understand code constructs and concepts like the context-sensitive selection I mentioned above. Being able to move a java file and have it update all my imports and packages. Being able to auto import when I start typing a class name. Code templates (eg type "iter" or "itar" in IntelliJ then hit tab when you want to write a loop).
The amount of mental effort that seems to go into recreating an environment you get for free with an IDE is mind-boggling to me. By this I mean the constant tinkering with plugins and extensions.
Unfortunately many vim/emacs diehards use Eclipse as a strawman argument against IDEs ("I once used Eclipse and it was slow thus IDEs suck") when Eclipse is (IMHO) at best a medicore IDE with a lot of warts.
The other area where vim/emacs have survived is with the C/C++ family of languages (Visual Studio notwithstanding for Windows users). That's because tooling in this area has been pretty basic. I applaud Jetbrains' recent CLion effort.
The problem here is that the C++ grammar is so incredibly complicated it makes tooling difficult.
This is one reason why I appreciate the design goals of Go: simple grammar leads to easier tooling and faster compilation.
[1]: http://ux.stackexchange.com/questions/30682/are-there-any-re...
>1. Click anywhere between the parentheses;
You lost me at step 1.
I know you mentioned 'some might object to the mouse use', but I would argue that a large number of people who prefer modal editors like Vi(m) do so because they can be driven completely by the keyboard and don't require you to use the mouse - which is disruptive and annoying (IMHO), obviously YMMV.
P.S. I gave you an upvote and I'm not sure why people were downvoting you. You presented clear and logical arguments for your opinion and even if I disagree with them, I can still respect them.
For some of us annoying is the least of the problem. Using the mouse to edit for more than an hour or two causes me crippling pain. Without Vim, or something else that would allow me to avoid the mouse 100%, I'm not sure I'd still be able to edit code at all.
Not every developer will develop RSI problems, but fewer would if they used a mouseless workflow.
https://www.jetbrains.com/idea/help/keyboard-shortcuts-and-m...
which reminded me of another big thing I miss out on when using a text editor: navigate to superclass/declaration/implementation and "Find Usages" for a given function, class or variable.
You can have the best of both worlds. For example, I use Visual Studio with the VsVim plugin. Visual Studio is my IDE, but vim is my editor.
I wouldn't choose my editor based on something that happens rarely and is merely "annoying."
One example (from C++, so maybe not relevant for IntelliJ) I use them for is converting enums to a case statement.
e.g. if I have:
typedef enum
{
VALUE_1,
VALUE_2,
VALUE_3,
...
VALUE_10
} MyEnum;
I can copy/paste lines from VALUE_1 through to VALUE_10, and then start recording a macro as I change VALUE_1,
to case VALUE_1:
break;
Adding a final 'j' to move down a line before finishing the macro.Then I just run the macro several times and each line gets converted.
That's a pretty simple case (hah), there are plenty of other (and more complicated) uses for them too.
switch (enumVar)
hit alt-enter and it gives you the option of filling in the missing branches. This even applies to partial switch statements missing some of the cases.
I also prefer integrated tooling like merge and git tools - both intellij and eclipse have great examples of these, rather than running 10 commands to replace 1 button click and pretending its the same thing.
i suppose my ideal company uses only typesafe languages so you can really ramp up your dev velocity with an ide - scala+scala.js or java+typescript for example.
personally I find intellij has better frontend plugins, but i honestly prefer the editing experience in java eclipse - too bad each editor in eclipse is its own experience.