10 ms·
My pet peeve is Vim tutorials that start with "use hjkl to move around" instead of "use `set mouse=a` to turn on the mouse." In my opinion you need to make sure
by MatthiasPortzel 4y ago
My pet peeve is Vim tutorials that start with "use hjkl to move around" instead of "use `set mouse=a` to turn on the mouse." In my opinion you need to make sure that you are very clearly disclaiming that you are teaching a harder way of doing things in exchange for incredibly small productivity gains that will be realized years in the future, if ever.
(This is basically a copy-paste of previous comments I’ve made, I haven’t tried your tutorial beyond the first lesson.)
- kjeetgill 4y agoHuh. I mainly find myself disabling mouse=a if it's on by default. But that's mostly because the only time I'm using my mouse is to copy/paste something out of my term and it breaks that. Also, I think scaring people away from arrow keys is premature. It's not that big a deal.
- deleted 4y ago[deleted]
- Silica6149 4y agoAh, I see. I agree, more context would be better for the beginner to understand why the lessons are the way they are. I tried to explain the benefits of vim in the "Why Vim?" section, but I should really go into why using and learning vim will be slower at first than using the editor you're already comfortable with, and how it might be worth it in the end. Thanks for the feedback!
- stevenjgarner 4y agoIMO, the choice of nix editor is always somewhat contextual depending on how much full stack work is being done. If one is doing a lot of systems work (ie a lot of bash commands), then one inevitably wants to set a default editor on the systems being used. While I choose vi, it really depends on the number and type of systems being regularly accessed, and your personal preferences. For me the use of a terminal editor is just part of the seamless flow of using the command line for everything else. I personally don't think it is especially valuable to consider terminal editors in isolation away from bash, other than to become familiar with key strokes.
- delusional 4y agoThis may be a little elitist, but if you're not going to use vim the way it's really made to be used, why even bother? I get that `mouse=a` makes it more familiar, but if you're always going to reach for your mouse, you're never going to really get used to the motions.
- effakcuL 4y agoTbh, one of the biggest issues with vim for me is, that all my coworkers do not use it. When I have to explain something to them, they are completely oblivious as to how they navigate vim without the mouse. So enabling mouse is one of the most important things for me
- MatthiasPortzel 4y agoI use Vim as a secondary editor, when I need to quickly edit a file in my terminal or over an SSH session. I'm not interested in it replacing my primary IDE. If you're going to disable the mouse and the arrow keys and really commit to the home row, more power to you. That is probably the best way to master Vim. But I think a significant number of people looking at Vim tutorials have never used the editor, and I think they deserve to know that there is an easy way to make the editor more comfortable and more familiar. Someone down-thread used a metaphor to say 'the best way to learn a new language is by immersion' which is something I would agree with. But opening Vim for the first time feels like being dropped into a foreign country where no one speaks your language. Imagine how frustrated you would be to find that the people there actually do speak a language that you know, they're just refusing to understand you because you haven't issued the magic words, "set mouse=a"
- delusional 4y agoThat's certainly valid. I've had friends throughout the years that used vim as you would nano. I don't think vim is any good when you use it like that since the more advanced features just get in your way, but if it works for you then that's cool. The people who seek out a "learn vim" course are just not that kind of people. In this case you've signed up for a course on how to speak Spanish only to ask the teacher to not speak Spanish.
- manx 4y agoAgreed. Hjkl only makes sense when using a keyboard layout where these 4 keys are located in a row. This fact made most vim tutorials useless for me, as I'm using the neo2 keyboard layout, where arrow keys are located in the middle of the keyboard and hjkl are not in a row. Using vim works well for me, and I can use hjkl for other keybindings.
- opan 4y agoI posted another comment on this, but I never found this to be an issue when using dvorak or workman. Just as I slowly relearned to type the letters at all and improved over time, I kept using vim and got used to hjkl being moved over time. It doesn't bug me at all.
- manx 4y agoInteresting. I guess the difference here is that I learned vim after neo2 (https://neo-layout.org https://neo-layout.org), not before. That way I already had proper arrow keys in my home row and hjkl felt cumbersome and redundant.
- vscode-plz-stop 4y agoI just created this account to say that I agree wholeheartedly 100%. People always ask me, "How do I get better at Vim?" or say "Vim is too hard" etc, and I always say `set mouse=a` isn't just a gimmick, it's a _very_ useful feature...
- Silica6149 4y agoDefinitely a hurdle to overcome for beginners. Although, it would help to show beginners exactly why abandoning the mouse will be better in the long run. It wouldn't do well for them to always rely on it in place of more efficient commands. Some people might always use the arrow keys instead of hjkl, for example, when hjkl will be better in the long run since they are on the home row.
- CJefferson 4y agoI buy the idea that the more advanced features of vim are worth it, being able to quickly cut+paste bits of text around, skip to end of line/bracket/etc. I don't believe I'd write usefully larger amounts of code by using hjkl instead of arrow keys, and personally I am always going to use the mouse when I want to move more than a couple of lines.
- dimensional_dan 4y agoThe comparison is not between hjkl, arrows and mouse movements. Vim motions are far richer than that.
- Silica6149 4y agoYup. I had tried to use vim and quit because I thought it was needlessly cumbersome. What changed my opinion was watching videos of people using vim on youtube that made me interested in learning it for real. It made me realize how much more efficient it could be.
- em500 4y agoI use vi(m) more often on remote servers than locally, and in many cases I don't have much control what software is available. Mouse support is a crapshoot, so I never bothered with that.
- BirAdam 4y agoI very whole heartedly disagree. I find vim to be an unusable vi implementation until I turn off mouse support completely. For that matter, I also have to turn off any automatic indentation and any other "smart" feature that people try to ram into their distro-default configurations. It's nearly as annoying as autocorrect is on a desktop computer.
- yetanotherjosh 4y agoa harder way of doing things initially in exchange for incredibly small productivity gains that when applied millions of times over the course of a programming career, make a monumental difference A key ethos of Vim is that once you climb the initial learning curve, you're on a path of increased efficiency for the long haul. Moving the hand to the mouse, dragging the cursor to the spot you want, then moving the hand back to the keyboard, is objectively slower than key-based movement commands for someone who has climbed the learning curve and I'm confident that could be proven empirically though I'm not aware of any such proof. There may be certain exceptional cases where the mouse is faster, but for most editor usage it would not be. I'm not sure if you agree w/ that and are just criticizing how tutorials introduce people to Vim, that they should start w/ the mouse to lower the learning curve, which might be an okay argument.
- Lio 4y agoCounter point; set mouse support and if you want to use it use and if you don’t don’t. I’ve been using Vim as my primary editor for 25 years and at this point the keyboard nav is burnt into me. I still use two finger scrolling on my track pad though. If I’ve been in another window I might also start the cursor at a point with trackpad. It works fine over ssh too. I think most newbies that care enough to try Vim know there is a Vim Way. They know about Vim Golf. That get tiring all the time when you’re starting out. Sometimes they just want to get the job done until they learn, I’m ok with that. Just have a go. It’s absolutely fine to make use of all the features Vim provides and use it any way you want because you’re always going to me slowly learning more.
- renewiltord 4y agoInteresting, I always move down by page. I find the mouse to keyboard switching disorienting. But I know lots of great engineers who use the mouse extensively. I wonder if I just trained myself into this efficiency (and out of that efficiency) when I was young. I bet I could untrain with sufficient work but it's no longer worth it.