3 ms·
This is all very well for the particular task, but now let's get into serious keyboard usage, where the difference is made. The real approach to this particula
by chrismorgan 14y ago
This is all very well for the particular task, but now let's get into serious keyboard usage, where the difference is made.
The real approach to this particular problem (yes, I know it is a specialised problem; knowing when to use the keyboard and when to use the mouse is part of the matter) is to use find-and-replace functionality.
- The find and replace approach using Word for Windows, keyboard: Ctrl+H [Find and replace; shortcut may not be correct, I'm just working from distant memory], |, Tab, e, Alt+A [replace all].
- The find and replace approach using Word for Windows, mouse: find the find icon. I believe it's near the end of the Home tab in the ribbon, now. Click on it. Go to the Find and Replace tab (probably?). Focus on the Find field. Enter "|". Switch to the Replace field. Enter "e". Click the Replace All button. (Probably agree to replacing from the start of the document as well.)
Now tell me that that was faster with the mouse than with the keyboard (assuming that you knew where everything was from the start).
Vim.
- Keyboard: :%s/|/e/g<Enter> (and it's in your muscle memory, anyway, so that the whole thing takes no more than four seconds).
- Mouse, find-and-replace way (assuming you have the toolbar showing - I certainly don't): much the same as Word. It's in a toolbar icon.
(Note that if you have set ``behave mswin`` you can have the dubious convenience of a Word-style select mode with which you could do the replacing the slow way as in the article in just the same manner).
Which method is faster in this specialised case?
Being aware of actual timing issues and knowing when to use one and when to use another is important. I do, very occasionally, use the mouse in Vim. But Vim has such a good keyboard interface (and, you might choose to argue, not a well-tuned mouse interface) that the mouse is needed precious rarely.
And every time I've gone back to make a modification in this comment while writing it, I've used the keyboard. And I know it was faster.