Live data from Hacker News

Why I can’t stop using Vim

kornerstoane.com

71–80 of 169 posts

Re: Why I can’t stop using Vim

#71

Earlier quoted context omitted.

> Same with "1G to go to the top of the file, G to go to the bottom" - esc-1-shift-g vs ctrl-home. Same with ctrl-end. gg beats both (I don't think I've ever used 1G to jump to the top of the file)

I was taught that one by the brother-in-law. He also tried to teach me 1234l (the letter 'l') to go to the end of a line. I figured out a better way pretty quickly on that one. I didn't find the magical 'g' until much later, and 1G was already burned into my synapses. I'm trying to change. It's a little awkward :)

I've been using vim for 5 years and a student showed me you can do it with commands too.

:10 :25 :1

I tend to use that a lot now and I don't know why. However, you can do some pretty cool command with ranges of lines.

Re: Why I can’t stop using Vim

#72

I spent this entire weekend setting up Evil mode for Emacs, in the Emacs Starter Kit package. It's been decent so far. Evil mode is surprisingly good, and I really don't think it could come any closer to vim emulation for Emacs. Took a lot of googling around to set up some basic plugins that I need - projectile for CtrlP etc. I think the only thing that I need atm is Magit integration with Evil and I'll be good to go…

Do you happen to have some resources you can share? I've been playing with Tidal, a live-coding library and it wants me to use Emacs, and I just... can't. So any info on setting up evil-mode would be great, especially since it's fresh in your mind. I've found some resources but really don't know where to start.

Re: Why I can’t stop using Vim

#73

Earlier quoted context omitted.

Interesting coincidence, I was pasting a production certificate into Vim the other day and it contained "kj", which escaped the editor and ate a few letters until it reached an "i" and continued pasting. It took production down for 30 minutes until I noticed it. Remember, kids! ":set paste".

"+p will paste the system clipboard.

No way!

I just tried it, it doesn't work :( That's too bad.

Re: Why I can’t stop using Vim

#74
post #69
post #32

I went back to Sublime after using Vim for a while but then realized I was going to have a terminal open 24/7 anyway so what's the point? Then I learned how to use a terminal multiplexer and now Sublime and other GUI editors just hinder my workflow. IMHO if you're a programmer you should know how to use a terminal to the point that you prefer it over most GUIs (of course, you should always use whatever has the featur…

I'm not a seasoned user or anything, but I prefer to use Emacs with a GUI rather than in the terminal. It has nothing do with there being more GUI-type things in there - I have things like save-icons etc. turned off. It just feels more like it's own application in GUI mode (if I run it in terminal mode, the Meta hotkey doesn't work as usual, which I suspect is because the terminal is using the alt-key (meta) for some…

The only advantage I know for using emacs in terminal is that you can get used to it when you'll have to ssh into a remote server.

Anyway today we can just sshfs and use even a random ide for everything so... we can do as we like.

Re: Why I can’t stop using Vim

#75
post #20

First you'll learn how to orientate around text quickly using normal mode, then you'll start playing with tabs, splits and buffers to search between multiple files, and then you'll start using registers to save phrases and regular expressions to search directories. At that point you'll never want to leave Vim again. :wq

:x (It's the same as :wq, but one character shorter.)

Even shorter:

    ZZ
"Shift z z" is one key shorter than "shift colon x enter"

Re: Why I can’t stop using Vim

#76
post #66

Earlier quoted context omitted.

So Windows programmers, according to you aren't programmers?

Do windows programmers not know how to use a terminal?

For the most part they don't even need to know how to use a terminal, even to manage a server.

Re: Why I can’t stop using Vim

#77
post #17

Earlier quoted context omitted.

I think you're using the editor's modality wrong. ESC is not used to exit from Insert mode. ESC is used to switch from any mode back to Command mode. In fact Command mode is also called Normal mode. You should spend 95% of your time in Normal mode and use the other modes when you need them. I suggest binding `kj` to ESC since it allows you to quickly make a change and continue browsing your code. Take the following s…

Interesting coincidence, I was pasting a production certificate into Vim the other day and it contained "kj", which escaped the editor and ate a few letters until it reached an "i" and continued pasting. It took production down for 30 minutes until I noticed it. Remember, kids! ":set paste".

[deleted]

Re: Why I can’t stop using Vim

#78

Earlier quoted context omitted.

"+p will paste the system clipboard.

No way! I just tried it, it doesn't work :( That's too bad.

Are you on a mac and using the system default vim? If so, Apple cripples it to not be able to directly access the system clipboard -- use homebrew's vim or macvim instead.

Re: Why I can’t stop using Vim

#79

Earlier quoted context omitted.

Interesting coincidence, I was pasting a production certificate into Vim the other day and it contained "kj", which escaped the editor and ate a few letters until it reached an "i" and continued pasting. It took production down for 30 minutes until I noticed it. Remember, kids! ":set paste".

"+p will paste the system clipboard.

Nah. I've had terrible and inconsistent results with this. I literally hate this thing so much that I've stopped using it altogether. It's most likely due to me not figuring out exactly what's going on but I can't be helped at this point.
Post reply on HN