Live data from Hacker News

Interactive Vim tutorial

openvim.com

81–90 of 230 posts

Re: Interactive Vim tutorial

#81
post #77

Honestly though, is it even worth learning? I've tried learning VIM a few times and always gave up, and feel like my editors shortcuts cover most cases anyway. There's also not that many times where I feel like coding speed is required. Honestly curious how much more productive you guys feel after learning VIM.

For me the productivity boost is mostly a matter of having a suite of very powerful shortcuts/commands that I can use everywhere. I use them in all IDE's (IntelliJ, Visual Studio, Eclipse all have great vim plugins); I use them in any terminal I get access to, even when I can't install software; and I use them in less, Chrome, man and other other tools that copy vim's shortcuts either natively or through plugins.

In actual day to day use, it is more a matter of saving my fingers from stressful yoga tricks.

Re: Interactive Vim tutorial

#82

I've tried learning Vim several times, but the need to switch modes and back for cursor movement has been a huge turnoff, especially considering the location of the ESC key. It seems to just conflict with the way that I type, where I am frequently jumping my cursor around in the middle of text editing, which is effortless in Emacs. Maybe mastering Vim is not just about memorizing key combos but about changing your co…

> especially considering the location of the ESC key

This can be solved by remapping ESC to Capslock.

Re: Interactive Vim tutorial

#83

I've tried learning Vim several times, but the need to switch modes and back for cursor movement has been a huge turnoff, especially considering the location of the ESC key. It seems to just conflict with the way that I type, where I am frequently jumping my cursor around in the middle of text editing, which is effortless in Emacs. Maybe mastering Vim is not just about memorizing key combos but about changing your co…

I feel the same way. vim is optimized for editing text rather than writing new text. The assumption is that we are editing existing text more often than writing new text when coding.

Re: Interactive Vim tutorial

#84

Alternatively, don't try to hurry enlightenment. First, learn :q! Next h,j,k,l Then i and ESC Finally :w Now you know vim. Don't let people tell you you're using too many keystrokes. Are you still reaching for the mouse? If not, you're using vim just fine. Most of the good stuff in vim, you'll learn accidentally, because you're in normal mode when you think you're in insert mode, or because you have caps lock on in n…

I always recommend 'Your problem with Vim is that you don't grok vi.' to new users starting out in vim [0]. You can never learn about the language of vim too early. [0] https://stackoverflow.com/a/1220118/2131903

That's a very informative link -- I can see how that might be helpful context for a new user. It's hard for me to get into that mental frame, since my first text editor was edlin for DOS. I'll stick by my recommendation to type first and study later, however. Experience is a powerful teacher.

Re: Interactive Vim tutorial

#85
post #54

Earlier quoted context omitted.

To expand on the answers, C-h t opens the built in tutorial, which is good. It only covers the basics of navigation, but that's what you need to know to start. The tutorial is interactive. Since emacs changes its behavior depending on the mode, it would be impractical to do a more in depth tutorial, in my opinion, but I liked the Mastering Emacs ebook.

One of the very best features of Emacs is it's built in help system, faster, more convenient and more accurate than most program wikis or on-line documentation. Emacs is too big to learn every one of the 7000 or so functions, one learns just what's useful in a particular realm. Anytime it's necessary to wander into new territory, there is really good built-in help system available. Help commands start with Ctrl-h. Th…

The only gripe I have with emacs help, is that it does require some basic skill to use it. The help opens in a window in the existing frame and you need to know how to jump back and forth and close. It's a bit like having to drive yourself to your learning to drive lessons. But once you've done the built in tutorial a few times, you should have that basic skill.

Re: Interactive Vim tutorial

#86
post #42

All these tutorials are like taking beginner French. If you want to learn French live in France. If you want to learn Vim you have to live in it. Use it for your development full time. Then over time you start to see it's power. For me on Windows, GVim was the only sane option. Mostly because the Windows console can't fully handle syntax highlighting / italics. However it's also a good transition world. You've got al…

I fully agree with you, however some people are worried by the loss of their daily productivity especially if they are used to using their mouse a lot, for those I will recommend to start learning vim in their browser to surf mouse-free using plugins like SurfingKeys[1], vimium[2](chrome), Vimperator[3](Firefox). Once used to surf without reaching to the mouse and know the essential vim key, you'll be ready to use vim daily for your dev work, without a big loss in initial productivity.

[1] https://github.com/brookhong/Surfingkeys

[2] https://vimium.github.io/

[3] https://addons.mozilla.org/en-US/firefox/addon/vimperator/

Re: Interactive Vim tutorial

#87

Alternatively, don't try to hurry enlightenment. First, learn :q! Next h,j,k,l Then i and ESC Finally :w Now you know vim. Don't let people tell you you're using too many keystrokes. Are you still reaching for the mouse? If not, you're using vim just fine. Most of the good stuff in vim, you'll learn accidentally, because you're in normal mode when you think you're in insert mode, or because you have caps lock on in n…

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.

Re: Interactive Vim tutorial

#88
post #77

Honestly though, is it even worth learning? I've tried learning VIM a few times and always gave up, and feel like my editors shortcuts cover most cases anyway. There's also not that many times where I feel like coding speed is required. Honestly curious how much more productive you guys feel after learning VIM.

I use vim when I ssh into a remote server and don't have a UI and editor available.

Good points, thanks guys.

I only SSH occasionally and it is a pain to navigate through nano. I actually tried a bit of vimtutor this morning and found it pretty enjoyable.

Re: Interactive Vim tutorial

#89
post #77

Honestly though, is it even worth learning? I've tried learning VIM a few times and always gave up, and feel like my editors shortcuts cover most cases anyway. There's also not that many times where I feel like coding speed is required. Honestly curious how much more productive you guys feel after learning VIM.

No.

If you could improve your typing efficiency by an order of magnitude (not likely), how much time would you save? Minutes per day? Certainly not a whole hour.

Use a modern IDE with sane out-of-the-box configuration (ex: JetBrains.) Realize that you spend more time thinking than typing. Eliminate redundant typing with templates.

I used vi for years, then emacs for nearly two decades. I will never go back.

Re: Interactive Vim tutorial

#90
post #77

Honestly though, is it even worth learning? I've tried learning VIM a few times and always gave up, and feel like my editors shortcuts cover most cases anyway. There's also not that many times where I feel like coding speed is required. Honestly curious how much more productive you guys feel after learning VIM.

For me the productivity boost is mostly a matter of having a suite of very powerful shortcuts/commands that I can use everywhere. I use them in all IDE's (IntelliJ, Visual Studio, Eclipse all have great vim plugins); I use them in any terminal I get access to, even when I can't install software; and I use them in less, Chrome, man and other other tools that copy vim's shortcuts either natively or through plugins. In…

+1

Also consider vim in your web browser (vimperator or vimfx or qutebrowser or vimium)

Vim in your file explorer (vifm)

Vim in your terminal (tmux in vim-mode)

Vim in your mayonnaise for lunch (https://lisalynnfit.vimtoday.com/images/thumbs/0000878_1200....)

Vim as a floor wax/desert topping (http://www.mysavings.com/img/link/large/74808.jpg)

and so forth.

Post reply on HN