45 ms·
To move fast, use the mouse[1]. Trust me. I've played that game of always trying to find the most efficient way to target something on the screen in Vim. If you
by stevebmark 3y ago
To move fast, use the mouse[1]. Trust me. I've played that game of always trying to find the most efficient way to target something on the screen in Vim. If you haven't already learned about EasyMotion, tried it, and gave it up, you probably haven't tried to perfectly optimize your movement in Vim. It's not a game worth playing. Figuring out how to navigate your screen with the keyboard is a Vim problem: editing text now is something you have to think about, a lot.
[1]There is no conclusive evidence that Vim's motions help you type nor navigate faster
- ykonstant 3y agoIt is extremely frustrating to see a post downvoted just because it is a diverging opinion, especially when it contains some of the best advice in this thread. Indeed, for random access on screen, there is no better alternative than the mouse or trackpoint (the latter defeating the non-argument about moving your hand, since it is literally in the middle of the home row), that is what it was designed for. And if for whatever reason you don't want to use a trackpoint, install EasyMotion and map the random access motion to spacebar or another big key as I have done. It is the second best way to achieve random access on screen. For more structured motion/editing tasks, I am perfectly happy with Vim's advanced motions on text-objects. But random access is still a very common task, and trackpoint or EasyMotion is just both faster and more "ergonomic".
- jodrellblank 3y ago> "Indeed, for random access on screen, there is no better alternative than the mouse or trackpoint" There should be. Touchscreen. Eye tracking. With a mouse I have to go via a silly walk[1] moving my arm and scraping a chunk of plastic over a desk as a proxy for scraping a mouse pointer over the screen. With a keyboard I have to invent a magical incantation of button presses to poke the state machine and make the cursor do a silly walk over the lines/rows/words/brackets/search term/etc. from where it is to where I want it to be. Why can't I look and "go there" directly without either silly walk? [1] https://4.bp.blogspot.com/-53TOKiAMoow/VD0EeGQ24oI/AAAAAAAAW3A/CFCQb3XD4OE/s1600/Ministry%2Bof%2BSilly%2BWalks.gif https://4.bp.blogspot.com/-53TOKiAMoow/VD0EeGQ24oI/AAAAAAAAW...
- ykonstant 3y agoGood point, touchscreen is even faster. Eye tracking may be hard to make work properly (false positives, false negatives, invalid actions...), but would indeed be the fastest.
- jodrellblank 3y agoDan Luu has a blog post about this: https://danluu.com/keyboard-v-mouse/ https://danluu.com/keyboard-v-mouse/ Conclusion: "Unlike claims by either keyboard or mouse advocates, when I do experiments myself, the results are mixed. Some tasks are substantially faster if I use the keyboard and some are substantially faster if I use the mouse. Moreover, most of the results are easily predictable (when the results are similar, the prediction is that it would be hard to predict). [...] This result is so boring that it would barely be worth mentioning if not for the large groups of people who believe that either the keyboard is always faster than the mouse or vice versa."
- jrib 3y agoPart of the appeal for me is not having to move my hand to the mouse and back.
- 2023throwawayy 3y agoIt is simply not possible for me to disagree harder with everything you said. I don't think at all about editing text. Using vim is so natural, and so, so much faster. I watch my mouse-bound colleagues when they screen share on an almost daily basis. It's painful to watch. I am far faster with vim.
- swah 3y agoMy impression is that Vim feels faster (busier hands) but most likely very similar actual speed to a proficient VSCode/Intellij user with shortcuts and mouse. I find myself enabling and disabling the plugin every now and then. It feels fun until it conflicts with my VSCode use and I remember that the objective is not to use Vim but to work on the code, deliver my tasks, etc.
- stevebmark 3y agoHi throwaway, ask your mouse bound colleagues to rename the file they're editing, then do it faster in Vim ;) I'm just kidding, hopefully you were sweating a little though. I'm a Vim power user as much as anyone, and multiple cursors replace 80% of complex editing tasks in Vim (and are way nicer to work with over macros, because you get instant feedback), and a good IDE replaces the next 15% of what I use Vim for. Vim is a text editor, not a code editor, and I mostly work with code. For the other 5% of what I want to do, I don't really miss it. Like using q: (meaning q-colon). A critical shortcut to use in Vim, if you don't know it and q/ you probably shouldn't be using Vim, but I don't really miss it. In fact pressing up/down arrows in VSCode's search box and command box do the same thing, now that I think about it.
- weitzj 3y agoMy sweet spot right now is Vim + i3 (or sway) + udxvtd and a fixed trackball on the desk
- mikemallon99 3y agoWhen you first starting Vim motions you’ll be putting thought into it, because it takes time to develop your muscle memory and learning where the motions are useful. But once you get going, it feels so much faster than using a mouse. Just being able to use a keystroke to copy or replace text inside a set of parenthesis is so much faster than clicking and dragging your mouse cursor inside the set of parenthesis. Not sure who is collecting the data on Vim motions being faster than mouse, but just from experience it feels way faster and more satisfying than using a mouse.
- penjelly 3y agoits not about perfect movement. Its about keeping your hands on the keyboard, fewer keystrokes (over using arrow keys), and being more precise. The idea also isnt to think super hard about what to press next, the movements become 2nd nature, so you're barely thinking about them. sorta like when you type a sentence you dont think consciously of each character, your brain mostly relies on muscle memory to reach the keys necessary. edit: before i get flamed, im NOT saying you NEED to use vim to be the most productive. The best devs on my team DO NOT use it. So its not necessary, but it is a lever some can pull and benefit from. also, your quote/citation doesnt provide any value. Just because there isnt a study on vim doesnt mean it doesnt increase productivity..
- tmtvl 3y agoUsing the mouse only really works in Acme, every other editor makes you switch between mouse and keyboard way too much. The mental and temporal overhead of switching makes it severely unoptimal. Maybe it would work better using (left|right)-handed Dvorak or a Mother-of-all-Demos-style chording keyboard.
- tipsytoad 3y agoIt's not one of the other. You can definitely use a mouse _and_ vim. I wouldn't recommend easymotion to anyone, a mouse is just so much better suited to that sort of behaviour. But there's plenty of motions much better suited for vim bindings, such as change the text up to the next bracket with ct( or changing the contents of a string in ci" and just e and b instead of alt arrows. I think people can just get carried away with "my hands will never leave the keyboard" but it's fantastic having the best of both worlds with vscode + neovim extension
- kungfufrog 3y agoI don't know vim. I can type reliably at around ~120wpm and ~150 if I concentrate and it's standard prose. I can't edit code as fast as VIM users and I know this is true, I keep wanting to learn VIM so I can, but I also just plain can't be arsed as it's not the bottleneck necessarily for me it just makes some editing actions more tedious not knowing VIM. Great examples of this I see regularly watching coding streams are what look like "macros" that replay the last editing actions. Seems super powerful when replacing a word etc (and not all languages have proper support for variable renaming etc).
- sva_ 3y agoI do believe the arguments about using vim for productivity gains are somewhat silly. I probably spend most of my time thinking about code rather than typing/editing it. However if I want to convert a thought into code, I can do it very quickly. That being said, using vim is just so much more comfortable. When I want to move to a certain location in a file, I don't think about what I want to do. The movement comes out of muscle memory, just like I would move my limbs to walk over a large rock in a challenging terrain. I think that comfort of being able to keep my hands on home-row and quickly jump to anywhere on the screen and beyond is what really sold me on vim. (I've been using vim for about 5 years and it probably took at least 1 year to get to this level of comfort.) In that sense, I can fully understand (predominantly) Windows users preferring their mouse as they choice of movement - but I do look down on them with a certain sense of imagined superiority.
- mnsc 3y agoOh, you said the quiet part out loud. And as a happy and content mouser, I actually used to get a bit triggered by vimmers condescending tone. But I found that I could read this thread without being either jealous or provoked. Takes all kinds.
- keithnz 3y agoI found easymotion is a bit disjointed, but between sneak (a two letter motion similar to f such that you can do ; and , to go next or back) and /<search> I find I can get places very quickly