Link: http://www.codinghorror.com/blog/2008/03/revisiting-keyboard...
Link: http://www.codinghorror.com/blog/2008/03/revisiting-keyboard...
For scrolling down a couple of pages, copying 3 lines of code, moving back up, pasting, and then changing a couple of characters, I actually believe I am faster with a mouse than keyboard, after quite a bit of trying to master vim.
"For scrolling down a couple of pages,"
CTRL-B and j several times (vs. scrollbar/scroll wheel)
"copying 3 lines of code,"
3yy (vs. select block, right-click -> 'Copy')
"moving back up,"
'' (vs. scrolling)
"pasting,"
p (vs. right-click > 'Paste')
"and then changing a couple of characters,"
(depends on the text)
"I actually believe I am faster with a mouse than keyboard, after quite a bit of trying to master vim."
I would humbly suggest the sum of the parts is greater than the whole, especially the use of marks and (unmentioned here) macros or the '.' repeat command.
Yeah, but then you're stuck counting lines. Whereas with a mouse, you just click and drag exactly what you want.
"p (vs. right-click > 'Paste')"
This is more difficult if you've copied whole lines but want to paste inside a line or replace text with your paste.
I love me some vim, but I do think it's easy to think we're faster than we are. I wonder if I recorded myself and then watched it if I'd think I was as fast as I feel that I am.
:set relativenumber
> This is more difficult if you've copied whole lines but want to paste inside a line
I agree, but the case where I want to copy multiple lines and have the first line start in the middle of a line is very rare in the languages I use.
> or replace text with your paste
That's what Visual mode is for. Personally, I find pressing Shift-V then j a few times is usually easier for line selection than acquiring the left line-selection margin or finding the end of the text.
In these cases I wouldn't say it's faster as much as I would consistent and easier. I do find myself having to clean up slight mistakes more often with mousing than I do vim commands.
point-click-drag, CMD-X, scroll, point-click, CMD-V
Or for replacing a word at an arbitrary location with other text: scroll, point-double-click, type.
Eschewing a tool for "purity's" sake is not a virtue.
When I work with the mouse, I use my right hand (on the mouse) to select and my left hand (on the keyboard) to cut, copy and paste.
A more reasonable example than using Ctrl-P to Print is Ctrl-S to Save, I think. It's so much easier to hit Ctrl-S when you already have your left hand on the keyboard than using the mouse, and frankly I see no reason to ever remove my left hand from the keyboard.
http://en.wikipedia.org/wiki/Acme_(text_editor)
Usage for cut/paste: http://news.ycombinator.com/item?id=2658527
1 year ago I was teaching a class and had to give up vim. It was too quick for people to follow.
I'm in my fourth week of vim after using Netbeans for years. I'm still waiting for these magical performance improvements. I think that good, consistent keyboard shortcuts are useful but completely ignoring the existence of modern GUIs and the mouse is just stubborn.
Thinking, reading & browsing, writting -- those should take the most time in front of the computer, in that order. If you write more than think, you're either Don Knuth (hi there, Professor!) or using some VisualBasic 1.0 Verbose Edition. If you write more than read, you're working on a three-file project that only calls a few stdlib functions.
My point? That's not where the money is.
What you want is to make software for an pre-existing ecosystem of other software. Re-use code, build upon ready-made libraries and services. You get to think of how to interact with them, you get to browse the docs, jump around code a bit, pinpoint the right place and then type. Just a little, because you're using a high-level language.
Thinking? No idea how that interacts with the mouse. Except that being able to hold a snack or mug in the other hand helps sometimes ;-)
Browsing? Sure there is Vimperator [1], but most of the time you want mouse to browse docs and code efficiently. You want to use it profficiently, and you want an editor that treats your code (and possibly data, like Adminer [2] does for SQL DBs) as hypertext. Occasional ^F, sure, but that doesn't dominate. You can search with mouse, it's faster.
Programming? You work on various chunks of code or data. A block, a line, a word, a tag (if you are an XML person). All that's fast to indicate, search, select, copy, move etc. with mouse and proper editor [3] that doesn't force you to go through menus or toolbars. You want to click on the right FILE:LINE in compiler's error output and see it in editor, not keyboard through the output or manually input FILE:LINE it into editor when it's right there on your screen.
Of course keyboarding feels like it's doing that faster, but see the original article about why appearances are misleading here.
And yes, I've seen folks still using the old right-click, pop-up-menu, going all the way to `Cut' and then right-click, pop-up-menu, all the way to `Paste'. That's kind of backward and bloody sad, but not by itself a counter-argument against fast work with mouse.
----