Hacker News new | ask | show | jobs
by lordlarm 5408 days ago
I too wanted to click around the first month (+/-) after switching to vim, I think we all did.

However, it seems like the author learned the basics of vim, but stopped before he learned about powerful navigation keys, visual mode etc.

I think the moral is: if you feel you don't get the hang of vim/nerdtree etc., don't give up - keep going, there is a reason why so many people use it.

5 comments

> don't give up

Yes. All the tutos I have read recently insist on using hjkl, which is a matter of taste, but do not emphasize what I believe is the most important (for terminal use): cut and paste.

- Easy cut and paste in Vim is done with yy and p, avoid mouse and ctrl-c/v or any other trick that is not "inside" Vim.

- Good trick are to first select a block with <shift-V>.

- Don't forget P, which is pasting above current line or before cursor, often more logical than p.

- This implies to open different files inside the same Vim instance, using :Explore or :edit

- If you have to copy some outside text inside Vim, by all means, use the paste mode (:set paste), if you don't you'll mess up your text.

Also worth remembering is that every command that deletes really cuts. Which is to say, deletion commands like x and dd store the deleted content in the register that will be used when you hit p or P. This is important to know both because it can be very useful sometimes and because it can get in your way other times (e.g., if you're trying to repeat an action and keep replacing a line with another line, you'll have to paste before you delete so you don't override your register).
Or you can specify the register name. Don't limit yourself to the unnamed register.
Absolutely. My fault for not mentioning it :)
vnoremap <leader>p "_dP

"_ is the blackhole register, with this the replaced text disappears and you can continue "putting" the new text at will.

Thanks, I didn't know about the paste mode.
The reason that people use (mac)vim is not necessarily the ‘powerful navigation keys’ etc. For me it’s the ability to deal with large files and the crazy indentation rules people use and I know it’s the same for quite some other users.

The way people work differs from person to person, the idea that someone should always just keep on trying, even if something doesn't feel right, is in my opinion useless. The real moral here is that people should accept that everybody is different and that it’s ‘ok’ for them to be different and how great it is that open-source software such as vim enables them to do so. Something that’s unfortunately always a bit harder for passionate users. (No insult intended!)

I definitely know that _I_ prefer to browse a project with a GUI that works like in the rest of my platform of choice, but I also know I’m very different from the average vim user :)

Agreed - this is pretty much the only reason MacVim lives on my machines. It handles huge files way better than anything else I've tried.

I can use vim. I know it pretty well. But the inescapable fact is that, for me, it's clunky and requires more thinking than just using a mouse and pointing at something, then typing what I want to type. I use it because I haven't found something better (and I'm sure it exists, I just haven't seen it).

It's only clunky when it isn't second nature. If you invest the time required to use it without thinking, you'll find it's quite elegant.
I can do thousands of other things with that time that are worth infinitely more to me.

As it happens, I do.

It's a text editor, not a religion.

That's your decision. But it's also why you think it's clunky.

It's an awesome text editor. Who said anything about religion?

During my undergrad time (circa 2002), I spent around 6 months using nothing but Vim. I really wanted to "grok" it.

Even after learning a lot of the commands and the different modes, it never grew on me.

I think it is a shame as I touch-type and try to minimize the use of the mouse via shortcuts.

That's exactly why I tried again. The drawer is just a way not to go completely mad when I'm stuck trying to open files "the fast way" and I think these tools make it easier for people to get the hang of it. :)
You can click on NERDTree with a mouse-enabled vim, for the record.
I know, I've used it for a while, but somehow it just didn't feel right, if you know what I mean. :)
Sure, I get it.

For me, vim is surprisingly similar to drinking scotch: I first tried it at age 19, and wasn't pleased with my experience at first. But a wise mentor informed me it took a little getting used to, showed me how to do it right, and after a month or two I loved it.

Here is a great post explaining some of the more intermediate stuff: http://stackoverflow.com/questions/1218390/what-is-your-most...