5 ms·
I think, because you're used to it, you're under-estimating the cognitive overhead of using the mouse. It also sounds like you've bought into some of the worst
by sevensor 9y ago
I think, because you're used to it, you're under-estimating the cognitive overhead of using the mouse. It also sounds like you've bought into some of the worst kind of vim evangelism, the kind that says effective vim users never hit j repeatedly to move between lines. Granted, it's not the best, but if you're moving only ten lines, V followed by repeated j takes basically no thought to create the selection. If it really bothers you, v followed by / will extend a selection to the match. I find that I mostly use / and ? to move around. In that context, setting hlsearch and incsearch might be helpful.
You might also want to use code folding, especially if moving blocks of code around is something you do a lot of. If you delete a fold in vim, the whole fold goes into the paste buffer.
- mercer 9y agoWhat's the cognitive overhead? I'm a huge vim weenie and a pretty fast typist, but I'd never argue that the mouse is obsolete when compared to vim. For example, I've played FPS games where I had to target something the size of < 10 pixels, in less than a second, and the need to move my mouse from one end of the mouse pad to the other. Basically, the mouse and (in most cases) cursor are barely separate from my body when it comes to pointing at things on the screen. So when I need to put the cursor somewhere, I still find that using the mouse can be much faster than any vim key combination. While I do agree that the 'context switch' from keyboard to mouse matters, I still find using a mouse/trackpad worth the relative effort often enough that 'pure' keyboard vim is a degradation in experience.
- dredmorbius 9y agoReaquiring the cursor is an issue for me on systems that "helpfully" make vim mouse (or touchscreen) sensitive. The cursor's where I left it, damnit. Don't move it and force me to put it back. There are times when directly pointing to screen elements is useful. Working with text I almost always find it gets in the way
- sevensor 9y agoI don't think the mouse is obsolete, just that it's an obstruction when it comes to editing text. Vim, emacs, and my current favorite, kakoune, all give you a rich language for talking to the computer about how you want your text to be arranged. The mouse doesn't speak that language. It requires you to switch from thinking about text as text to thinking about it as a pixel target. That may only feel natural if you play a lot of FPS games.
- mercer 9y agoWhile I do agree that when it comes to editing Vim/emacs/kaoune might be superior, I spend a nontrivial amount of my coding time in 'discovery' mode. scrolling, clicking around, and mouse stuff in general is very useful in that case, and in my experience definitely faster than keyboard-only. I could try and make a nuanced argument of when and where a mouse is preferable to a keyboard, but I think even just scrolling is enough of an argument for me. CTRL-D or whatnot just doesn't do justice to scrolling with a mouse. Anyways, mostly I'm a fan of Vim and using its approach as much as possible. I just get annoyed when Vim-fans try to argue that a mouse is never better, which honestly I feel is a the argument of a fanatic. I've never come across a remotely good argument as to why a mouse is never the answer, and it always feels like a needlessly 'partisan' type thing. Keyboards are cool. Mice are cool. Can we all just get along? EDIT: I got a bit carried away and I do agree more with you than this comment might suggest. I just think 'editing' is not the only thing I do when coding, and for some of that other stuff a mouse is a huge advantage, even in a coding context.
- sevensor 9y ago> I do agree more with you than this comment might suggest Well spoken, that goes for me too. Something about internet discussions amplifies disagreement!
- gjjrfcbugxbhf 9y ago> Keyboards are cool. Mice are cool. Can we all just get along? Agreed. I'm a vim fanboy - and I use the mouse.
- 9y ago
- pmoriarty 9y ago"I've played FPS games where I had to target something the size of < 10 pixels, in less than a second, and the need to move my mouse from one end of the mouse pad to the other." Do you type with just one hand? Because that's what you'd need to do to replicate that performance while coding. If you type with both hands, now you have to add in the time it takes you to move one hand from the keyboard to the mouse, make the mouse motion (which could be far across the screen) and then back to the keyboard, repeating that cycle for every single operation which involves the mouse. Meanwhile, someone who knows vim well and is not reliant on the mouse can type with both hands and only has to move their fingers.
- foldr 9y agoI have my mouse right next to my keyboard (don't most people?). I can grab it about as quickly a I can press a key.
- pmoriarty 9y agoEven if that's true (which is doubtful, as the motion to press a key is much shorter than to move one's arm all the way off a keyboard to the mouse), then you still have the additional time it takes to move the mouse to where it needs to go, and then the time it takes to move your arm back to the keyboard. There's no way that's going to be as fast. It's also going to be a lot more tiring, if you do that a lot, than merely moving your fingers.
- jstimpfle 9y agoThis can not be overstated. I haven't seen many GUI type programmers programming in my live, but none of them was faster than "slow". I die of impatience when I watch them edit.
- foldr 9y agoSure, but you usually have to press a bunch of keys in just the right sequence to do the equivalent with the keyboard. Some things are quicker to do with the mouse and some things are quicker to do using keyboard shortcuts. I don't understand why people take such absolutist positions on this. My arm doesn't get tired from moving a few inches to grab the mouse.
- deleted 9y ago[deleted]
- Someone 9y agoTog (probably in “Tog on interface”) claims people overestimate the cognitive overhead of the mouse because it is so simple to use, and cites research showing it (including such examples as having to move the mouse over a large screen and back to access a menu item, compared to a keyboard command) Using the mouse, he claims, is so boring that your mind has time to spend on other things, and that gets perceived as wasting time, while the keyboard continually requires one’s attention, making using the keyboard seem instantaneous I think that’s why your advice to use repeated j instead of lower keystroke count alternatives is good. And yes, his research is old (early 1980s) but it wouldn’t surprise me if it held even with die hard vim or meads users. Those keys you press may be close by, but you have to choose between tens of commands every time you issue an editing command.
- tincholio 9y agoI've read some of his stuff on this issue, and noticed his experiment design was atrocious, and he has 0 peer-reviewed research. So, I'm taking anything he says with a grain of salt. (I've been doing user research for over 15 years, in a different context, but still I've read tons of HCI/UX work, so I'm not just talking out of my ass here)
- sevensor 9y agoBy and large, I think vim evangelism is deeply misguided, in that it asks you to learn too many things, it sees golfing your edits down to minimal keystrokes as something other than a total waste of mental energy, it encourages heavy plugin use, and it turns the vimrc into a whole program of its own. The whole point of using an editor like vim is that you don't have to think about it very much. Which is why I encourage using the basic movement and editing keys with reckless abandon. The only thing that justifies learning a new feature is that the simple way is deeply inefficient. Not just less efficient, but so terrible that it's wearing out your fingertips and leaving you annoyed. Global search and replace with regular expressions is a good example. Sooner or later, hitting the letter n and the period key over and over to repeat a replacement is going to get so tiresome that it's worth learning regex, but a novice user can go a long while before doing that and still be quite productive.
- jstimpfle 9y agoI put this in my ~/.xsession # keyboard autorepeat delay / rate xset r rate 170 30 It's tuned to my personal typing to be just slow enough that I never have accidental ddoublette kkeypresses, but fast enough that I can just hold down 'j' or 'k' in vim to move 10 or 15 lines (and easily hit the target). Using the mouse cannot even come close here (assuming you don't have your hand on it already). 15 lines would be 620ms here technically, so including the human factors it's still comfortably below a second. Really it makes a huge difference. (I saw this first in a talk by Edward Kmett).
- brandonmenc 9y ago> you're under-estimating the cognitive overhead of using the mouse What "cognitive overhead?" And how is memorizing a bunch of arcane key combinations for cursor movement and region selection not cognitive overhead? The (imo, dubious) argument against the mouse has always been that there's a strictly mechanical penalty for moving your hands around - not that there's "cognitive overhead."
- sevensor 9y ago> What "cognitive overhead?" Let's break down the cognitive overhead of mouse use. Setting aside the "reaching for the mouse" penalty, there's a lot of work involved in mouse-related tasks like copying a selection: 1. Move your eyes off of the text you're editing so you can find the mouse cursor. 2. Figure out where the mouse cursor is relative to the text you need to edit. 3. Effect that relative movement with your mouse. 4. Highlight the text for copying. 5. ^C or some other key combo to yank the selection. 6. Reorient the mousing hand to the keyboard (find the home row keys again). Steps 4 and 5 take an equivalent amount of mental effort, but 1-3 and 6 don't exist in vim. That's the cognitive overhead I'm talking about. > And how is memorizing a bunch of arcane key combinations for cursor movement and region selection not cognitive overhead? Visual selection is the letter v in vim. There are four keys for basic cursor movement. Then y for yank, d for cut, p for paste. Vim only seems arcane because so many posts about vim are really about demonstrating how smart the author is. I get pretty exercised about this because it's chasing people away who could really benefit from learning vim. Vim is not arcane, vim has a dead simple core with a bunch of entirely optional features on top of it.
- brandonmenc 9y ago> 1. Move your eyes off of the text you're editing so you can find the mouse cursor. Try this: keep your eyes fixed on a character, then wiggle the mouse or trackpad. I don't think I ever actively look for the pointer before using the mouse, and I doubt anyone else does either. I'm guessing that if you can track the mouse pointer without taking your eyes off the text you're editing, most of your listed steps become non-factors.