Hacker News new | ask | show | jobs
by phzbOx 5397 days ago
It's when I see gems like these that I feel like spending time to learn emacs. I've tried a couple of times.. but it is so damn hard. I feel like vim keybindings are burnt in my memory/fingers.. and it makes it so unproductive to relearn something totally different. Any vim power user successfully switched to Emacs? If so, did you switch back missing Vim or you're still using emacs and couldn't be happier? (I'm still interested in the reverse side.. where Emacs power users switched back to vim).
5 comments

I'm a vim user who started to really get into Lisp (and now ML for school). Emacs (especially with SLIME) is really the Right Thing for Lisp, so I started using it. I've definitely gotten to the point where `C-a C-k` is as well burned into my fingers as `dd` is...it's just that

a) `dd` seems like a more natural keybinding--both because I'd rather double-tap a home row button than involve three fingers and two hands, and because, if you do stop to think about it, `dd` makes sense--`d` means delete, and a double-tap usually makes something apply to a whole line. (Of course, `dd` / `C-a C-k` is just an example--this applies in general.)

b) There's more of a zen to vim. It's been discussed before, but it's worth repeating--vim commands form a language with nouns and verbs. `w` means word and `(` means sentence. Now you know two commands. `d` means delete, `y` means yank, and `c` means change. Now you know 8 commands--`w`, `dw`, `yw`, `cw`, `(`, `d(`, etc. And adding a few more "nouns" brings you up to several dozen with minimal effort. Emacs has no direct equivalent * .

So I like emacs for the ecosystem, I like it for the freakish integration it can achieve between a REPL and a source file...as they say, it's a great operating system--it just needs a good editor.

* - This is not quite true--emacs does try to do sane things with the use of `C` and `M`. `C-f` means "forward one character", and `M-f` means "forward one word"--a "bigger" form of the same thing. In the same way, `C-d` deletes a character and `M-d` deletes a word. But now you want to delete a line? Time to learn something completely new.

Edited to make a lame effort to fix my formatting problems...thus the asterisks surrounded by a sea of whitespace.

I had the exact same experience, and agree with everything you said.

I'll note that I tried vimpulse for a while. Then I stopped. I wish I could be more helpful, but that's all I remember. I don't even know if stopping was an actual decision that I made, or if I just didn't start again after reinstalling everything.

(vimpulse-mode is an attempt to bring vim keybindings to emacs.)

I tried using viper, and eventually just got confused and realized that I should just learn emacs...and the best way of learning emacs was to go cold turkey. Some things emulated vi, not vim (delete key would not remove a newline, pressing undo twice resulted in undo->redo (and no net change)). Some things were intercepted by emacs (C-v to try to enter visual block mode). It was just a confusing and unhappy time.
seconded! I made the same beginner's error, too, and then decided that it was just the wrong thing to do. Emacs does not have a modal concept and cursor movement is not done with "hjkl" (and "ew") in Emacs. As Steve Yegge said, you should use incremental search forwards and backwards instead. I guess that eliminates many of vim's keystrokes (stats would be interesting), so staying with its keybindings might be prohibitive to learning Emacs...
I'm a hardcore Emacs user and yet my keybindings are Vim keybindings. I sleep well at night.

There's a package called "Evil" that provides good Vim keybindings to Emacs. You might hear references to "Vimpulse"; this is the successor to that.

My config file is at https://github.com/pavpanchekha/dotfiles/blob/master/.emacs.... --- you probably care about the section on Vim keybindings.

Thank you! It's nice to see how you structured and commented all sections.. really helpful.
I used Vim for a quite a few years before switching to Emacs and I was fairly proficient at it. Although similar to Unix and Emacs it would take a lifetime or more to know everything about it. I still use Vi(m) today when logged in to a remote server or for small editing tasks, but the more advanced usage has slipped from my memory... I don't even know how to use keyboard macros anymore.

There's one big 'if' to my Vim usage which made me want to try out new editors: I never really like the modal editing paradigm.

Upon getting interested in Common Lisp I switched to Emacs because I also wanted to be able to use ILISP (Slime nowadays). Once I made some customizations and implemented some ideas which I thought would be cool for an editor to have I never looked back[1]. Modern day IDEs haven't really been able to impress me either and Emacs' customization language being a Lisp was a pro as well.

However, I have customized a lot of my keybindings. While the basic editing commands are okayish the more complex "chords" are hideous and all the additional modes add more and more complex chords. By custom there's one prefix ("C-c" IIRC) behind which the user can put his own keybindings but I just ignore that and override everything to fit my keybindings.

(Even more fun: I recently decided to change my keybindings to fit in more with the more custom keybindings found in other applications found on Unix, Windows and Mac: Ctrl-o for opening a file, Ctrl-f for search, Ctrl-r for replace, Ctrl-w for closing a window/tab/buffer, etc. etc. It's not been too bad actually and seems like a keeper.)

I've never found it hard to switch between them (apart from the occasional 'ZZ' in Emacs) just like it's never been hard to switch between QWERTY and Dvorak for me.

[1] Being able to customize and try out new things without have to recompile or even restart is very nice. (ie. the Lisp way)

Hi,

I have been using vim extensively for about 8 years and used a boring phase during my previous work-life to start learning Emacs. My motivation was not because I liked anything particularly well in Emacs or disliked vim, but more that I wanted to see first-hand what the difference is really all about. (So that I know what the flame wars are all about, without ever needing [and also never wanting] to participate in one...)

I am still using vim from time to time, but cannot imagine going back to vim full-time and leaving Emacs. The learning curve is steep and getting a nice setup takes considerable time (thankfully, there are very enlightening articles, for example the one from Steve Yegge, as well as the excellent emacswiki; plus, many people post their ".emacs" file on the web.) IIRC, it took me about 6 months until I felt proficient, and now, after almost 5 years or so, I couldn't actually be happier. There are many reasons to my happiness with Emacs (TRAMP, ido, yasnippet, auctex+reftex, vcs-interface, dired+, org-mode, macros, breadcrumbs, etc.) but I don't want to get into that, let's just finish this by saying: if you're generally interested and have some time at your hands (it's far less cumbersome as you might think, and mechanically codifying is usually [for me at least] not really the time consuming task in programming), just do it and stick with it for a couple of weeks!

I've had the same feeling. When I learned about org mode, I actually spent a week using emacs exclusively trying to get used to it and failed.

But whenever I feel this way I wonder why these sorts of applications don't exist for vim. I don't know many people who would argue that vimscript is as good a language as lisp is, but isn't it complete enough to do stuff like this? Or you could use python to do it.

Is it a cultural thing? Is there some infrastructure support in emacs that makes applications much easier to write?

Armchair psychology: I think vi users have a more "Unix mindset" as in a program should do one thing and do it well. While Emacs users want to do everything in Emacs (browse the net, walk directories, use shells, edit movies, etc. etc.)

The generalisations I just made are so broad as to be useless though :-)