For years I believed that eschewing the mouse was speeding me up. But I recently had the pleasure of working with a fine gentleman, and a SublimeText user, who is an absolute fiend with the mouse. He has considerably more development experience than I, so it is not an unbiased comparison, but I believe his raw editing speed was a bit faster.
This confirmed my suspicion, originally triggered by reading about the Acme[1][2] editor in Plan9, that such a workflow can be quite efficient.
[1] http://en.wikipedia.org/wiki/Acme_(text_editor) [2] http://www.youtube.com/watch?v=Pydckb9ZU8Y
The difference is probably negligible, though.
The way I work in Acme, commands (whether built-in or my own) are presented in front of me for execution, so I edit and highlight and execute them. I don't take time out of thinking about code to think about the magical key combinations that do whatever. So it's more muscle memory to commands on the screen and sight recognition than remembering keystrokes. I do recall that many of my Emacs commands were muscle memory, but the more I wanted to use, the harder it was to remember them all. I lost them quickly when I stopped using emacs. Years from now the commands I used to manipulate files in a given directory will still be there in the guide file, waiting for me to run them without error. (I help this along by directory-specific logging of interesting commands.)
I was especially happy to get away from the hundreds of extra options in the GNU tools userland, which made entire other tools obsolete (e.g., sort -u obsoletes uniq, except when you need to uniq -c or uniq -d). All these options are the enemy of clarity in code, so you can more confidently write portable, straightforward scripts, go back to them later and actually read them.
Adding support for moving the cursor with the arrow keys would not involve a very high amount of complexity. I found that Acme required me too much to just let Rob Pike dictate how I should work rather than providing a tool that I can customize to my habits and my needs.
Since we, as programmers, deal with very small targets, using the mouse is not the most efficient way to go.
Some editors allow us to move very quickly to the next opening bracket on the line (Vim's f{ for example) while most editors can't help beyond a certain point (usually the OS's word-by-word jumps). If the only means you have to reach that opening bracket is a dozen presses on the right arrow or the mouse… well, the mouse may have its chances. When you can do f{ the mouse is simply useless.
Also, the motion of the mouse is non-linear: you have typically a fast startup followed by a progressive slowdown until you reach your target. That slowdown happens because the fast startup was done in the general direction of the target and must be adjusted a few times to hit the target accurately.
Another thing to factor is how often you use the mouse in your workflow.
When I do mouse-y tasks (Photoshop, browsing…), the mouse is my primary way too interact with my programs. My left hand is available for hitting modifiers or changing tools while my right hand is almost always on the mouse. In that context, I never loose the pointer and the mouse. Changing from task A to task B with the mouse is easy and costless.
When I do keyboard-y tasks, the keyboard is my primary means of interaction. I can spend a lot of time typing stuff, moving around… without touching the mouse. When I want to use the mouse I usually don't really know exactly where it is — that's a first problem — then, when I grab it, I don't know where the cursor is — second problem — which makes the initial targeting slow and error prone. Once the first steps are dealt with, the limitations in Fitt's law apply.
That's why the mouse is frowned upon among people who use primarily the keyboard.
However, how many people who frowns mouse use knows that you can select a word by double clicking on it, or that you can extend a selection using shift+click, or that nothing scrolls a document as fast as the scrollbar or minimap?
I think that my comment is clear on my position on that "mouse debate": the mouse is an effective interaction device in more than many contexts but there's at least one context where using the mouse is not the most effective thing to do.
Again, the problem is not the mouse itself but the cost of constently switching between it and the keyboard.
In any case we should soon have eyeball tracking to move around. and/or leap motion. also when can I simply shout at the screen and get it to do my bidding?
The clear win is using a powerful GUI-based editor that has tons of keyboard commands. Bonus points for being on Windows or Linux (i.e., not Mac OS) so you can navigate/BROWSE the menus from the keyboard.
I don't know Sublime myself; I'll have to check it out. For some reason I thought it was Mac-only, but I see that it's cross-platform. My editor-of-choice for years has been Visual Slickedit, but I'm not married to it. I just haven't found anything half as good in years of searching. And I keep trying other editors, too, since there are things I find imperfect about it (the scripting language is usable, for instance, but has it's own syntax and quirks).
In terms of scriptable editors, the Zeus editor is scriptable in Lua, Python, TCL or JavaScript, but it is native to Windows: http://www.zeusedit.com/
Jussi Jumppanen
Author: Zeus IDE
SlickEdit also Just Works with tagging. You put the files into a project, and everything is instantly cross-referenced. "Where is Foo::init() used? No, I don't want Blah::init(), just Foo::init()." SlickEdit, at least SOME of the time, can get that right, and with no configuration of external tools.
Aside from that, I think one of the greatest drawbacks of Slickedit is that it isn't open source, so when things go wrong I can't just fix it. Slickedit IS cross-platform, at least, with native Linux and Mac OS versions, and that ALSO is important to me.
Lua is the Right Answer for scripting, IMO. The rest of the options are actually a liability for me, since it means that if I'm editing someone else's script, I might have to deal with Python, TCL, or JavaScript.
I'm rambling now. I feel like I have an "Editor Manifesto" in my head that wants to get out, but I don't have time right now to do it justice. I'll take another look at Zeus when I get a chance, just as I'll take another look at Sublime and the rest. It's been years since I've looked, so I'll take another glance at it.
If you're telling me I can hit Ctrl-F2, then that's at least a step in the right direction. Thing is, it's several steps behind where I would be on Windows (or most Linux desktops), because I can just hit Alt-F and it opens the file menu, or Alt-T for the tools menu, or what-have-you.
Still, it's better than nothing. Thanks.
In any case, I prefer to use the F keys as standard functions keys.
I think your last sentence supports Sublime Text even more than it supports Vi(m).
http://www.asktog.com/TOI/toi06KeyboardVMouse1.html
http://www.asktog.com/TOI/toi22KeyboardVMouse2.html
http://www.asktog.com/SunWorldColumns/S02KeyboardVMouse3.htm...
[If you think this is incorrect, providing links to scientific evidence is more productive than downvoting or stating that your own subjective experience is different.]
Try coding in an editor, any editor, for 8, 9, 12 hours a day and see if you don't start forgetting the keyboard shortcuts because they become reflexive. Vi and Emacs are just hyperdesigned to enhance this effect.
EDIT: And I don't care that you link to Bruce Tognazzini, a GUI designer, when millennia of musicians have known that they don't think about what combinations of fingers they press to get an F#, they just play a glissando with an F# in the middle.
EDIT: not sure why the downvotes—should I have said "faster FOR ME"? Anyways, hi haters.
This ^^, say no more.
1. Start the graphical version, i.e. gvim, MacVim, or any version with drop-down menus.
2. Press 'i' to enter "Insert mode". Now just use it like any other text editor.
3. Use the menus. Note the equivalent commands (which are listed in the menus). When you want to use those commands, press ESC to switch to command mode, then enter the commands, then press 'i' again to go back to insert mode.
That's it. Modern vim has one of the smoothest learning curves of all software.
Read :help. I haven't read any books on Vim so I'm not sure if there are any good ones, but you most definitely do not "need" to read one.
"The point of a mouse is to make arbitrary on screen jumps efficient, and it’s very good at doing that. Don’t you ever think you can beat a mouse. Only in very few edge cases will it even matter."
That's kind of ridiculous.
When you edit text, your "jumps" are not arbitrary—they have a structure to them, and Vim lets you express your movement within that structure very efficiently in terms of lines, words, sentences, search, etc.
With a mouse or trackpad, you have to move away from the keyboard, make a movement to the general area you are targeting, then fine-tune your target down to a space between two characters to insert the cursor.
"Pathogen, the first widely used, known, and celebrated path manager making plugin management possible, was released in 2008! Before that, you were encouraged to recursively copy the plugin’s directory into your Vim folder."
And before 2008, Sublime Text was nonexistent. What's your point?
I have used a plethora of plugin systems, and Vundle is the pinnacle of all of them. Simple to install, remove, and update.
"700 hand written lines in my .vimrc, and 45 plugins"
I may have found the problem. Learn to use the editor.