Live data from Hacker News

Interactive Vim tutorial

openvim.com

191–200 of 230 posts

Re: Interactive Vim tutorial

#191

Earlier quoted context omitted.

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.

I've remapped capslock to ESC. I can't remember ever wanting to use capslock mode since I first learned to touch type. Much easier to have Esc there. Or Backspace, Home, End, or delete are also good options.

I mapped capslock to Control and use Control-c instead of escape. It's much easier on my pinky.

Re: Interactive Vim tutorial

#192
To learn Vim you have to use it everyday. Question is if most have the opportunity to use it full-time for development from day one. I started with Vim using it just as a todo list manager on a remote server. Wrote here and there some macros to add or mark todos and that was my gateway drug. Used it everyday and at some point it felt more natural than any other editor. So I fully switched.

Besides, I use Neovim for 1-2 years now.

Re: Interactive Vim tutorial

#193
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…

hjkl are the minimum keys needed to be able to move anywhere in vi[m], they're certainly not pointless.

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

Re: Interactive Vim tutorial

#194
post #186

Earlier quoted context omitted.

I'm happy you like VSCode so much. I do too, but I don't think it really qualify as a IDE. Same goes for Atom. Unless you consider Sublime an IDE as well. It has all the features they do, mainly because they ripped it off to gain them. Putting that aside, I totally understand what you're saying about Vim. I felt the same way when I started out with it. But I didn't have a choice at the time because the company I work…

> I'm happy you like VSCode so much. I do too, but I don't think it really qualify as a IDE. Same goes for Atom. Unless you consider Sublime an IDE as well. It has all the features they do, mainly because they ripped it off to gain them. I never said it was an IDE. At least, I never intended to say it was, because it's not. > And now, after 3 years of learning, and tweaking, and practising, I get Vim. It took three y…

> It took three years to learn to use Vim to be productive, is what you're saying here. Point and case.

It didn't take three years to get productive. It probably took a few months before I was fully productive, and that was while learning a new language and new codebase at the same time.

It's taken 3 years to get, not just comfortable and familiar but, beyond comfortable with Vim. It's taken 3 years for Vimming to become second nature. Actually, that's not true. I was typing Vim commands into my browser at the start of the year, so it's probably more like two years.

And that's not even 100% solid use. Last year, I used a lot of IntelliJ, VSCode, and Eclipse, but using Vim 1-2 days a week kept me in the habit enough that it's second nature to me.

Re: Interactive Vim tutorial

#196

To learn Vim you have to use it everyday. Question is if most have the opportunity to use it full-time for development from day one. I started with Vim using it just as a todo list manager on a remote server. Wrote here and there some macros to add or mark todos and that was my gateway drug. Used it everyday and at some point it felt more natural than any other editor. So I fully switched. Besides, I use Neovim for 1…

I 100% agree. I originally learnt Vim because I didn't have any choice. It was the only supported editor at my workplace, so I was thrown in the deep end, using it every day.

That kind of situation can foster resentment, but I embraced the challenge. I got use to Vim, and overall adopted a more "UNIX" approach to my workflow and development. I'm not all the way there, but I'm trying to embrace it more, little by little.

Re: Interactive Vim tutorial

#198
post #159
post #152

Earlier quoted context omitted.

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.

It's hugely inefficient to have to pick up your hand every time you want to move the cursor (assuming you're a developer and spend a significant amount of time in a text editor). If you don't want to learn a new tool to improve efficiency that's one thing but saying that it's out of place to use the 'hjkl' keys for navigation is pretty misguided.

Re: Interactive Vim tutorial

#199
post #19

Earlier quoted context omitted.

Vim has system clipboard support with the `+` and `*` registers.

Or even better, setting "set clipboard=unnamed" in your vimrc, which just makes it to so vim's clipboad is the system clipboard.

I never knew about this trick, which is pretty significant if you use tmux regularly. This just made my day!
Post reply on HN