5 ms·
Sorry, but I think that's really bad advice. For one thing, it doesn't give new users any positive experience or reason to learn vim. If all you learn is to do
by edanm 9y ago
Sorry, but I think that's really bad advice.
For one thing, it doesn't give new users any positive experience or reason to learn vim. If all you learn is to do things that are "pointless" (like learning hjkl), then you won't get any value out of vim. And if your way of learning is to do something that screws up your file and try to recreate how that happened, well, let's just say that every time I do something that screws up my file I'm in the middle of working, and the last thing I want is to stop and fix some random problem.
I usually recommend people try to get into vim easily, then learn the GOOD things. I.e. I think it's perfectly fine that people start with arrow keys, much as I love hjkl. But to get value out of vim, you should really learn "f" and "t", and text objects, then how they compose with "c" and "d". That is the reason I started loving vim myself - that's when I saw that it gives me something that other editors didn't give me, adn that encouraged me to explore further.
- sevensor 9y agoI think we just don't agree about what the good parts of vim are. I find f and t to be a minute improvement over forward search. I think hjkl is strictly better than arrow keys, because you don't have to move your fingers from the home row to navigate a file, and I think the basic editing commands I outlined are sufficient for a superior editing experience within a day of learning them, no deep study required.
- autokad 9y agoi'm sure it becomes intuitive with lots of use, bit i find it awkward with having to move my finger off the home keys to move left. somehow for me, its even more confusing that way. where as my arrow keys are completely intuitive, one finger for the left and right keys and the middle finger handles up down. to me its not a big deal to remove my fingers from the home row if i already have to move from the home keys.
- deleted 9y ago[deleted]
- aidos 9y agoForward search is probably my most used vim feature. /LOCATION<enter>c/NEXT_LOCATION<enter> and you can be in insert mode changing the content. The only thing you need to think about is the content you want to change. You don't think about how to get there, you don't think about how many times you need to hit arrow while holding down shift-alt, or the fact that it will always jump one too far and you'll need to shift-leftarrow back one.
- edanm 9y agoLet me clarify, I absolutely love hjkl, and couldn't live without it (seriously - I built scripts just so the computer will always have hjkl as arrow keys, and many other vim goodies). I just feel like it's a thing that people don't realize will help until they internalize it. Whereas almost everyone I show the text objects to immediately realizes their utility. I'm only looking at this from a pedagogical perspective.
- foo101 9y agoI have been using Vim for 15 years now and I completely agree with sevensor's comment. - Vim is not newbie-friendly regardless of whether you remove guioptions or not. One has to spend at least a few hours of study and practice to get comfortable with Vim. If one is forced to invest a few hours to learn an editor, one might as well get rid of guioptions and follow other advice provided in sevensor's comment. - Learning hjkl is not really pointless. hjkl and other motion commands makes Vim a unique and ergonomically a very superior experience. If one does not want to spend time learning hjkl and other motion keys, then one might as well skip learning Vim and pickup Emacs, Sublime Text or another capable editor.
- edanm 9y agoYou might be right. It's true that vim has a learning curve one way or another. On the other hand, if I want to show someone the "good parts" of vim, I try to show them something they can't do in another editor, rather than something that they can do (arrow keys). Even if I 100% agree that arrow keys are a worse experience, it's just not as convincing as something that can't be done outside of vim. At least in my experience.
- stefco_ 9y agoYeah, but that's a good way to sell vim. Once you've shown someone vim and whet their appetite, it's probably best to show them about 2 or 3 features and let them fill in the blanks while being at least minimally productive. I've recently taken this approach to emacs and org-mode. I'm a long-time vim user with a super-optimized vimrc, so I know what productivity feels like. I threw in spacemacs to reduce the learning curve, but I still was initially much less productive with org-mode and emacs than with markdown and vim for my TODO lists. Now, after using org and emacs for three weeks, I'm at the point where several of the amazing features that I had heard about are in my bag of tricks, and it feels awesome! But I've barely tweaked my .spacemacs file, have only learned a bit of org, and am sure that I am nowhere near peak comfort/productivity/flow. But if I had tried to learn all of the things that I know are cool about org-mode, emacs, and spacemacs all at once, I wouldn't have gotten any work done over the past few weeks, and honestly I probably would have given up. TL;DR: the fancy stuff is the best marketing, but it's best to start slow.
- zo1 9y agoA lot of people learn vi out of necessity. Eventually, they have to SSH into a server and have to make minor changes to files where it's quicker to do it right there rather than use FTP or VCS. If that's the case, all you really need to know are the basics that the OP mentioned. After that, it's up to the person's personality to decide if there is value in learning further and more complicated commands.
- unfunco 9y agohjkl are the minimum keys needed to be able to move anywhere in vi[m], they're certainly not pointless.
- systoll 9y agoVim supports the cursor keys, even in insert mode. Assuming the new Vim user already knows how those work, telling them that they instead need to go `Esc -> hjkl -> i` and ending things there... that's going to leave them worse off in Vim than saying nothing.
- earlybike 9y ago> Sorry, but I think that's really bad advice [...] If all you learn is to do things that are "pointless" (like learning hjkl), I agree. For navigation I rather use f, w, e, {,}, ctrl-l, ctrl-u, /, o. I think hjkl are overrated.
- sevensor 9y agoSo I've been thinking about this and your other responses in this thread, and I think I've figured out where our viewpoints differ, fundamentally. I think many people, yourself included, want to do more with an editor. That's your motivation for using vim, and so you pursue customization, advanced features, and relentlessly minimize keystrokes. (That's a plural you, by the way. I'm speaking to everyone advocating a bells-and-whistles approach to learning vim.) I want to emphasize that there's nothing wrong with this -- it's a perfectly valid frame of mind, but it's just not my frame of mind. In contrast, I want to think less about my editor. That is, I want editing text to be as automatic as touch-typing. I want for there to be as little friction between my mind and the screen as possible, so I don't want to learn new things about my editor any faster than I can incorporate them into the set of things I can do without thinking about them. As a result, I'm sure there are people who've been using vim for two weeks who know more features than I do after 20 years. Anyhow, I'd be really interested to know if you agree with this characterization of your outlook.