Live data from Hacker News

Why I can’t stop using Vim

kornerstoane.com

21–30 of 169 posts

Re: Why I can’t stop using Vim

#21
post #8
post #4

"/ for searching (really, no other editor has made it this simple)" Well, it's really esc-/ which is no easier than ctrl-f. Or am I missing something? Edit: 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.

I don't really agree about "esc". "Normal mode" is the normal mode as the name indicates. That's where you normally start from. It's the actual writing that's two characters more (start insert mode, write, exit). Unless you're just writing new file from scratch in one go, you're likely to be in normal mode a lot of the time. Also, shift is not needed for the beginning of the file. It's also "gg" for the first line /…

"It's the actual writing that's two characters more (start insert mode, write, exit)." Makes sense. Asking for permission to type in a text editor feels counter-intuitive, but I'll give that a try.

Re: Why I can’t stop using Vim

#22

Funnily enough, I'm going to other way: long time Emacs users, getting closer to switching to evil-mode (Vi emulation in Emacs). Doubt I'll ever leave Emacs though. As an aside, how does one keep up with Emacs package development? There is lots of stuff that's new to me (e.g. I just found out about company-mode). I'd like to have some way to have this information pushed to me, rather than having to go searching.

Well, there's a myriad of blog posts about great packages for Emacs, so that covers everything pre-existing.

Add MELPA to your package sources, then just M-x list-packages here and there and check out anything new that looks cool.

Re: Why I can’t stop using Vim

#23
post #17
post #4

"/ for searching (really, no other editor has made it this simple)" Well, it's really esc-/ which is no easier than ctrl-f. Or am I missing something? Edit: 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.

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…

Now, I believe it depends on the kind of programmers you are. My coworker is the kind who types in a lot of code and rewrites a lot of stuff. I'm the kind of rewires things and make subtle changes

Interesting, I was thinking something similar - suitability for maintenance vs from scratch.

Re: Why I can’t stop using Vim

#25

Funnily enough, I'm going to other way: long time Emacs users, getting closer to switching to evil-mode (Vi emulation in Emacs). Doubt I'll ever leave Emacs though. As an aside, how does one keep up with Emacs package development? There is lots of stuff that's new to me (e.g. I just found out about company-mode). I'd like to have some way to have this information pushed to me, rather than having to go searching.

You may want to check r/emacs on reddit. People discuss about new packages there. If someone knows other resources, please let me know as well.

Re: Why I can’t stop using Vim

#27
post #15

It's unfortunate that, to me, the title implies there's something wrong with a person who still uses vim and nothing could be further from the truth.

Oh c'mon. Us vim users are seen as "those crazy people" by the majority of other programmers, and they have at least some point :)

I am the only person in my office that uses Emacs. Everyone knows vim. Everyone loves vim. You think you're the crazy one?

Re: Why I can’t stop using Vim

#28
post #8

Earlier quoted context omitted.

I don't really agree about "esc". "Normal mode" is the normal mode as the name indicates. That's where you normally start from. It's the actual writing that's two characters more (start insert mode, write, exit). Unless you're just writing new file from scratch in one go, you're likely to be in normal mode a lot of the time. Also, shift is not needed for the beginning of the file. It's also "gg" for the first line /…

"It's the actual writing that's two characters more (start insert mode, write, exit)." Makes sense. Asking for permission to type in a text editor feels counter-intuitive, but I'll give that a try.

Vim really is an editor: It's designed around changing existing text. Inserting new text is just one of the actions you can perform, and you can combine that action with other modifiers, like "5ifoo" results in foofoofoofoofoo -- 5 repetitions of "insert foo"

Re: Why I can’t stop using Vim

#29

Funnily enough, I'm going to other way: long time Emacs users, getting closer to switching to evil-mode (Vi emulation in Emacs). Doubt I'll ever leave Emacs though. As an aside, how does one keep up with Emacs package development? There is lots of stuff that's new to me (e.g. I just found out about company-mode). I'd like to have some way to have this information pushed to me, rather than having to go searching.

evil-mode is actually pretty good. I've been using it for clojure (paredit is quite nice). Keep in mind, though, that not all packages are gonna work as expected (I had problems with multiple-cursors, for example).

Something I would really recommend you: there are a lot of people in vim (like me) that have remaped the ESC key to a combination of keys (in my case jk); that is, by pressing j followed by k you go to normal mode (it's actually way faster than having to reach ESC). In vim, such thing is very easy; in emacs, you need to install the key-chord package, and something like the following would work:

(require 'key-chord) (key-chord-mode 1) (key-chord-define evil-insert-state-map "jk" 'evil-normal-state) (setq key-chord-two-keys-delay 1.0)

Relative numbers are very nice, as well.

By the way, regarding company-mode, I think autocomplete is newer and it's what most people are using nowadays.

I found out about a bunch of plugins through emacs live and prelude (and then switched to my own config). Take a look to other people's config on github :)

Re: Why I can’t stop using Vim

#30
post #5

I don't really understand the comment about etags; if you use ctags in Vim, you'll get the same kind of functionality. If you want something more advanced, Emacs has support for cscope and GNU Global which give you more features. Considering that he's interested in having something better than VimScript and wants org-mode, it seems that Emacs + Evil would really be the best fit for him.

I've never had any problems with etags, either. I've always gotten the same functionality as vim. Maybe we are missing something.
Post reply on HN