Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would personally recommend using vim bindings in emacs, as they are (in my opinion) easier to make sense of and more intuitive. However, I'm sure this book is a great resource for all the other stuff and it seems very well put-together.


Agreed. I'm a 20+ year emacs user. A couple of years ago I switched to using the VI bindings (evil). It really is the best of both worlds. I was using VI regularly before the switch -- it was available on servers and co-workers machines, and emacs generally wasn't. (Well, maybe it was on some, but the customizations definitely weren't). Now I have much lower switching costs, gain the quick access of VI bindings, and the huge number of emacs plugins. win-win-win.


Learning some basic emacs bindings before using vim bindings is still valuable to me. Sometimes I have to use emacs bindings to do things.


Intuitiveness is subjective. Take cursor movement for example. I understand now h,j,k,l is a remnant from historic keyboards, but when I started learning vim, I couldn't fathom why 'h' moves a cursor to left and 'l' to the right, though I got used to it eventually. The emacs 'C-f' for forward and 'C-b' for backward were definitely more intuitive. Of course, depending on the mode, some emacs commands can be cryptic and leave you with a painful pinky, but they were definitely more intuitive to me.


hjkl is QWERTY-centric, and would be totally nonsensical to a user of a different keyboard layout, like Dvorak.

C-f, C-b are English-centric, and would be totally nonsensical to a user of a different language.

Intuitive is hard.


Hmm, maybe someone should invent keys with arrows on them! :P


That just sounds silly.


spacemacs (includes evil) plug: https://github.com/syl20bnr/spacemacs

Really great.


HN Discussion with a LOT of good comments regarding Spacemacs [0]

[0] https://news.ycombinator.com/item?id=9394144


Spacemacs is absolutely amazing. I've done the rounds with emacs - trying it vanilla and rolling my own config, or using the various pre-made configuration packages (prelude, emacs-live, starter-kit, etc), sometimes with evil, sometimes without, and nothing has ever come close to what they've pulled off with spacemacs.


I switched to using Spacemacs from vim a couple months ago. I find it's a huge boost to my productivity; letting me use vim modes/hotkeys that I'm used to, and adding the handy features that emacs and plugins can provide.


Yep, that's what I use as well!


When considering a tool with which one will work for many hours a day and many days a month over the course of years, for some people it makes sense to use expressive power rather than initial ease of use as the primary criterion for choosing among alternative sets of bindings. In the case of a tool like Emacs, the user is always likely to encounter new alternative work flows or to invent them theirself. This is what Emacs offers as an alternative value to Vim's Unix philosophy based idea of doing one thing and only one thing well.

There's nothing wrong with Vim, and nothing implicitly wrong with using Vim shortcuts in Emacs so long as one is aware of its Fortran in any language style limitations.


It isn't really about ease of learning - vim key bindings are just more internally consistent than Emacs ones. Even though I am a die-hard Emacs user, I like vim approach to keybindings better - because they're made to form a language of sorts.


Key bindings are totally a matter of personal preferences. I like Emacs-style bindings better. The only thing I think vi in my opinion does better is copying and deleting lines (yy, dd, p), which in Emacs is not so simple for such a common operation.


ctrl-k ctrl-y ?


Not quite the same. For instance, to duplicate a line in Emacs you have to go to the beginning of the line, kill it and then yank twice, and it doesn't even work always, particularly at the end of a buffer. In vi, it's just yyp. No corner cases.


I've been using emacs for a long time. When I duplicate a line I don't even know that I'm following the steps you mention, I just do it on autopilot.

What I like most about emacs though is that I rarely have to do repetitive tasks because I can write a bit of lisp code to do them instead.


Or you can go to the beginning of the line, press Control-space (set mark), press Control-e (end of line), then Meta-W (copy), and Control-y (paste).


Just to share experience, i've recorded Macro named dup-line and bind to `C-M-y`. And find it very handy :)


If you already know vi then keeping them as you move over to Emacs makes sense. Otherwise I'd recommend not doing this, as vi keybindings are an airbrake for productivity.


I must ask you regular evil users this: how do you go about interacting with things (such as a REPL) with evil? I'm coming from vim and evil mode is great, but it feels somewhat clumsy to have to keep switching to insert mode to use a repl,doing stuff, going back to normal mode, then switching back to my code and editing it.


i use viper mode but with different keybindings (the most commonly used movement keys are under or near the home row, layed out geometrically): https://github.com/bshanks/viperre


Evil user concurring.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: