3 ms·
This is definitely a good way to explain the appeal of vim, but this is exactly what IDEs let you do. In intelliJ: oh I need to introduce a new parameter here,
by octo_t 14y ago
This is definitely a good way to explain the appeal of vim, but this is exactly what IDEs let you do.
In intelliJ: oh I need to introduce a new parameter here, cmd-f6 -> add a new parameter, set a default and it does it across the entire codebase.
Another key press and it runs all the tests again.
- solutionyogi 14y agoAgreed. It's all about 'declarative' editing. I want to be able to declare my action and let editor take care of the 'details'. But, IntelliJ (or Resharper which I use) is only good for the language they are written for. There are quite a few times where Resharper doesn't have what I am looking to do OR I am working on language/text where there is no Resharper or equivalent [especially for dynamic languages]. In such cases, Vim is a god send. And the best part is that once you know the Vim language, it can be used to edit any text (programming or non programming).
- swah 14y agoReally hoping for the day that editor-independent intellij-like functionality for all popular languages is available.. like Yegge told us he wanted to do.
- martinced 14y ago"...add a new parameter, set a default and it does it across the entire codebase." OK but why exactly does a new parameter with a default need to be repeated at different places across the codebase? Because you're using Java and Java is incredibly verbose and requires you to do crazy stuff and you end up with a super-complected codebase where instead of passing messages around you're actually telling objects "do this", "do that" and then when you have one parameter to a method you're in a world of hurt (because that method is used from different parts of your spaghetti codebase). In Clojure, for example, you'd simply pass the parameters in an associative array (a map) and, even better, when you're constantly passing through the same set of parameter you'd simply wrap the method + its common parameters in a higher-order function and then you pass that higher-order function order. This makes for incredibly shorter codebases and incredibly easier refactoring. Don't get me wrong: at 75% off during doomsday I did buy my IntelliJ IDEA licence but you're foolish if you think that the "text editor" part of IntelliJ is anywhere near close what vim or Emacs do offer you. Also what's really great about Emacs is that you can add functionalities yourself to the "editor". Wanna run unit tests automatically and see the result in another frame/window/buffer? That's trivial to write. No later than yesterday I missed IntelliJ's "goto declaration..." feature. I wrote a quick defun in elisp that had... Seven lines of code and did 90% of the job. Sure people are going to hard that it's for those 10% cases where my script doesn't work that IntelliJ really shines but that's not the point. The point is that you can program Emacs to suit your way of working. You adapt vim / Emacs to yourself. With Eclipse / IntelliJ you have to adapt yourself to the IDE.
- Roboprog 14y agoDoesn't the menu of possible code transformations become somewhat large after a while? See also the comment somebody made here about the problem of huge code bases. (I understand that these are usually inherited, rather than created, but they are still a problem, not a virtue) Does the IDE have a menu item / command to move 3 lines up into the end of this if/else block? There are 2 ways to look at this problem, specialized IDE vs generalized editor. Both are right, at times. (I personally like to use the vim plugin within NetBeans) Oh, example of moving the lines just after an if/else into the block: (assuming sitting on the first line of to-be-moved text, which is just after a close-curly or end line) Delete the 3 lines: 3 d d Move back up 2 lines: k k Paste the 3 lines: p Indent the 3 lines: 3 > > 9 keypresses, no reaching for the right side of the keyboard, let alone a mouse. About is fast as you can think it, the block of lines disappear, the cursor moves back to the new block, the lines reappear, and then slide right. (ignoring the clumsy autoformat that most IEDs, er, IDEs want to inflict upon your code, I'll do the indent myself, just 3 keypresses)