Seven habits of effective text editing
moolenaar.net
moolenaar.net
The reason I think it matters is that there are a limited number of hours in the day. When I get home from work I have maybe three or four hours on a good day to make some progress on my own projects. If during that time I can save 10 minutes of holding down arrow keys and carefully maneouvring the mouse cursor around my code and so on, then in a week that's an extra hour or so of extra project time.
I think they miss the point. Speed editing with vim is not about how many lines you may produce in the day.
It's about the lag between the moment you think about what you want to write and the moment when it's written. Your editor should not be in the way, and that's what vim, when mastered, is all about : you simply don't think about it anymore.
It's for the same reason that vim tries to reduce hand movements, so you won't feel your editor in those extra displacements.
I think this is it exactly. In particular, when people start trying to incorporate typing speed into their arguments, it's a sign that they really don't understand where the bottlenecks are.
Agree 100%. Every other editor just feels like swimming in molasses to me.
When your muscle memory develops to a certain point, using Vim becomes a subconscious thing. You don't have to think about how to copy all the text in between two quotes and paste it at the end of the document; there are already words in Vim's vocabulary for doing that, so you just do it. You don't need to build mental steps because it becomes completely natural, as easy as typing natural English; and just like in natural language, the more words you know well, the more likely you are to be able to use the right word at the right time, using language effectively.
Equally valuable: Vim takes the repetition out of everything. A technically versed creative mind is wasted on any repetitive task. You should never, ever have to do anything more than twice in development. You should be able to repeat and automate tasks and scarcely think about it. In Vim, this need is met by skilful use of . to repeat actions and q to record macros.
When you edit text optimally, you can concentrate on the task at hand, and the editor stays out of your way and does exactly what you need it to. You don't need to build the "subtask" of making your editor do what you want; you can just do it. I think that people who focus on the time Vim does or doesn't save you are missing the point.
I find that certain repetitive tasks help free my mind up to wander around, think more abstractly about my code.
What's important to me is that my tools give me a choice about this.
Disclaimer: I use vim because I just like it. The key to becoming more efficient in my opinion? Learning to type faster. Saves you all kinda trouble when you're posting to HN as well ;)
So, use the tools that make you happy. Personally, I use Emacs and I love it. But I don't think that Emacs inherently makes me more efficient than, say Vim or Sublime Text. That said, you should use a tool with sufficient power so you are not limited by it. So no Notepad, sorry.
While this doesn't have a whole lot to do with a specific editor, I have to say that most "modern" IDE's I've ever seen suffer from too much mousing, and you can recreate their useful features in Emacs. I still love vi (and use it for quick sysadmin tasks), but there's a reason I have the Firemacs addon installed in Firefox.
As for IDEs and mousing: I hate when I have to reach for the mouse - I try to do as much as I can with keyboard short-cuts. I'm currently using Intellij IDEA for Java coding, and it is definitely possible to do a lot without the mouse. The big advantage is navigation. Most of the time for me is spent navigating the existing code, and there Intellij IDEA really shines compared to just a text editor.
I've written this up in more detail here: http://henrikwarne.com/2012/06/17/programmer-productivity-em...
Interestingly, despite my strong prefence for vim, and the fact that I spend most of my time in it, when I am actually writing new code, the only time I hit ESC (caps-lock) is to save.
Right, it's only a bottleneck if you use the wrong tool for the job. As much as I love vi for text editing, it is the wrong tool for HTML editing and for a growing number of other file types for which more specialized editors exist (e.g. Eclipse for Java).
I know that vi experts think they are very fast with vi but they are wrong: if you are using vi for anything but simple text files, you are not being as productive as you could be and you should really consider being more mentally flexible and use the right tool for the job instead of vi for every job.
Do you really think that? I can assure you that you're wrong: many world-class programmers use editors other than Emacs or vim.
There are great programmers who use Microsoft Visual Studio, Komodo IDE, Sublime Text 2, and many dozens of different editors.
No, only the programmers that you know. One thing that makes a programmer great is that they will always pick the best tool for the job, not the tool that they are used to.
The point here is not that Eclipse or XCode is better than vim, it's that no matter how productive you are writing Java or Objective C with vim, you will be more productive using Eclipse or XCode.
(More seriously: Eclipse is not suited for text editing, but it is suited for dragging and dropping getters and setters. If that's what Java programming is to you, you can save a lot of time with Eclipse.)
I have to close IntelliJ quickly, however, lest the Swing fonts BURN OUT MY RETNAS on my Linux box. How can anybody get any work done with font rendering that bad?!
From their blog: "default look and feel on Linux changed from GTK+ to Alloy IDEA – it uses system fonts and has a much better overall quality (worth to try for current users too)"
When will it be available?
Do you have a link?
Considering that about half of the Java community uses it and is quite happy with it, did it occur to you that maybe, your experience with it was not representative?
(That's generally how I feel about Eclipse. It will spend several hours analyzing your source code so it can do a perfect variable rename. But you can get 99.99% of the way there with "perl -pi -ne 's/int foo/int bar/g'" and fix the two cases it broke in seconds. I'd rather not write that and not do the fixup, but with so much cognitive load to make that automatic, it just isn't worth it. Why does refactoring Java require a complicated GUI application with more settings than the Space Shuttle?)
The one feature I really want is something that detects what problem I'm trying to solve and shows me the documentation for libraries that can help.
But really, I wish someone would write an article like "why I switched from vim to Eclipse", but I only ever see ones where the author does the opposite.
You haven't looked very hard, most Eclipse users today came from emacs or vi. And are you seriously arguing that a search/replace is more effective than a refactoring performed automatically with guaranteed correctness?
You are being unreasonably and inexplicable biased against Eclipse (and IDE's in general), it's pretty baffling.
Similarly, a cursory google search of 'switched "from vim to eclipse"' doesn't reveal any articles of this form.
If you can point me to such an article, or write one, I'd be interested, but I think you have to agree that articles of the form IDE->vim/emacs are much more common than the reverse.
Proportional font support for code and javadoc, to make better use of screen pixels.
Javadoc on mouse over
When debugging step by step, variable inspection on mouseover at source code point.
Most popular plugin features are well packaged for no hassle installation.
These are few of my favorite things that I can't do in emacs/vim...
Great article by the way. I enabled "hlsearch" and added "map <CR> :noh<cr>" in order to exit the highlighting by pressing return.
Whenever I read an article like this I find solutions to problems I didn't even know I had. The abbr trick is awesome!
What's the appropriate IDE for Ruby that will make me more a lot more productive than I could ever be with Vim?
For Ruby there's RubyMine at least. For Javascript/HTML there are Eclipse, Netbeans, IntelliJ and WebStorm.
That's a bit redundant, since WebStorm is kind-of a cut-down IntelliJ.
I've tried RubyMine, and I'm much more productive in vim.
If it comes down to having to spend a lot of time mastering this or that IDE, I still think I'd come out ahead with vim.
The bar here is that the IDE has to make me more a lot more productive than I could ever be with Vim.
A multiplicity of IDEs, each with somewhat different or even opposing techniques isn't really the answer either, I think.
"A multiplicity of IDEs...isn't really the answer either, I think."
Why not? Just because all you have is a hammer, doesn't mean every problem is nail. Different programs for different tasks? Who'da thunk it?
Also, where's your "intuitive excuse"? You know, the one where someone is familiar with Windows at home, so we'll make them use Windows at the office because we don't have to retrain them? That sort of thing is more proof that multiple IDEs aren't the answer.
Perhaps you get taxed mentally when switching between IDEs...I certainly don't.
When I started Vim, the cursor movement commans (/ * ? G ETC) where the first things I learned, followed by yank, cut, paste and registers.
I'm still amazed by the inline editing tricks I see.
This was on HN a couple years back. http://news.ycombinator.com/item?id=1710702
(Or that we can't touch where the cursor should be).
"Go to the next instance of this word, wherever that is" is helpful; having to proxy a leap to somewhere you are looking at, through a vim command, still seems suboptimal.
Note that this article was written in 2000. 12 (!) years later, we have amazing plugins that make :make rather quaint.
Most important vim command?
:help uganda