Live data from Hacker News

Interactive Vim tutorial

openvim.com

151–160 of 230 posts

Re: Interactive Vim tutorial

#151

Earlier quoted context omitted.

I 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.

i'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]

Re: Interactive Vim tutorial

#152
post #146

It's using hardcore classic vim key bindings. Insert mode doesn't even start when pressing actual Ins. I understand some can have nostalgia for the times of archaic terminals, but I find it counter productive. Sorry, but I'm going to use Ins and regular arrow keys, not i and h,j,k,l.

Then you’re missing the point of touch typing the commands from the home row.

Re: Interactive Vim tutorial

#153

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.

Or mapping ctrl to capslock and using C-[ for escape.

Re: Interactive Vim tutorial

#154
post #120

My biggest vim efficiency booster is remapping to "jk"

What do you do when you actually need to type the string "jk"? Type "j", then wait for sometime and then type "k"?

yes, however it is very rare I ever need to type that in an editing environment. I am usually not cracking jokes in my code :)

Re: Interactive Vim tutorial

#155

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 and ESC

I think i and Ctrl+[ is better? It's more in line with the idea of keeping your hands near home row.

Re: Interactive Vim tutorial

#156
post #87

Earlier quoted context omitted.

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 s…

I 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.

Let 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.

Re: Interactive Vim tutorial

#157
post #155

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 and ESC I think i and Ctrl+[ is better? It's more in line with the idea of keeping your hands near home row.

It's a fair point. I learned ESC long years before ^[ and it's stuck in my muscle memory. But a new user might benefit from using ^[ instead. Some keyboards put F1 where ESC belongs, and my habit has been to remap F1 to NOP because help is so annoying, but maybe I should remap ESC to help. That would get me to switch over in short order.

Re: Interactive Vim tutorial

#158
post #110
post #87

Earlier quoted context omitted.

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 s…

I 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. - Learni…

You 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.

Re: Interactive Vim tutorial

#159
post #152
post #146

It's using hardcore classic vim key bindings. Insert mode doesn't even start when pressing actual Ins. I understand some can have nostalgia for the times of archaic terminals, but I find it counter productive. Sorry, but I'm going to use Ins and regular arrow keys, not i and h,j,k,l.

Then you’re missing the point of touch typing the commands from the home row.

I simply find those keys for navigation awkward and out of place. Habits play a role here.

Re: Interactive Vim tutorial

#160
post #120

My biggest vim efficiency booster is remapping to "jk"

What do you do when you actually need to type the string "jk"? Type "j", then wait for sometime and then type "k"?

it waits `timeoutlen` before accepting the next character as literal instead of as part of the mapped sequence. see `:help timeoutlen`
Post reply on HN