3 ms·
Yeah, he had some odd examples. If you can't type "/word<cr>" faster than someone can move their hand to the mouse, target the word, and click it, then you can'
by vacri 14y ago
Yeah, he had some odd examples. If you can't type "/word<cr>" faster than someone can move their hand to the mouse, target the word, and click it, then you can't touchtype. That was a strange example of his.
But nevertheless, I would happily take up his challenge: let's find a word that is in the document, but not currently on-screen - hardly an 'edge case', more like 'routine task'. Good luck at winning that one, mouseketeer!
Another great one that sees regular use at my fingers is ci' or ci" - again, hardly an edge case, and blazingly faster than selecting the characters just right with the mouse.
I have no problem with using the mouse for certain things, but blanket statements like the quoted one are rarely anything but wrong.
- CJefferson 14y agoIf I am looking for a particular word, then I will use a search. Even notepad and nano has a short-cut key for a simple search for a particular word. Where I find a mouse useful is when I want "that loop which I suspect is misbehaving. That one which adds a new member to all arrays". There a quick flick of the mouse-wheel, and then fine positioning of the mouse cursor I find gets me to my location faster. Even when the loop is on the screen, maybe 35 lines up, I have to either do a binary-search style jump with the keyboard, or with the mouse just click on it. Also, looking for a particular word is easy when there is only one occurrence of it, or you want the next occurrence. A mouse might still be useful when there are many occurrences of a variable and you want (for example) one somewhere near the end. Perhaps vimmers tend to keep better track of where everything is to make it easier to "hard jump" to, while mousers tend to keep a more ad-hoc overall view, so they know approximately where to scroll to?
- tmarthal 14y agoMy .vimrc is the following: <quote>set number</quote> Which shows the line number no matter what in a vi editor. Jumping to a loop on the screen is as easy as viewing the line the loop is on, then hitting colon+line number (e.g. ":68"). This might be what you're referring to with a "hard jump". I also use the "number+command" shortcuts quite a bit. If you want to jump up/down 20 lines (or 2000), then "2000k" or "2000j" will move the cursor up 2000 lines or down 2000 lines. Also a hard jump. But to find an occurrence of a word at the end of the file, the typical search sequence is the following: 1) :$ - this jumps to the end of the file ($ is a common regex meaning 'end of', the same way that '^' means beginning of) 2) ?word - this does a backwards search for the word. this is at the bottom of the file, searching upwards 3) n - this jumps to the next occurrence of the word So thats like 5 keystrokes not including typing in the word. Jumping around and viewing files really is neat with vi/vim.