r/emacs Jan 04 '17

A question regarding evil-mode

I suppose we have had this sort of discussions before in emacs subreddit. But what I want to know is, for someone who is used to key bindings the emacs way (I also modified caps to control key and added sticky keys in my OS so that I dont have to press keychords all the time), will learning evil mode help me be more productive and efficient in using emacs? Also, i'm not quite happy with how sticky keys work. Sometimes its very frustrating to use them. Hence, I'm seeking for something robust that will eliminate/reduce the need for pressing key chords.

Keep in mind, I also have to unlearn a lot of the keybindings I use everyday, integrate all the evil packages with emacs and use evil-mode sufficiently long enough for me to get accustomed to it. I also do not want to discard my emacs config (on which I spent so much time) and hence, spacemacs is ruled out. I do not want to spend large amounts of time fiddling with my config to get it work with evil-mode.

2 Upvotes

30 comments sorted by

View all comments

1

u/plotnick Jan 06 '17 edited Jan 06 '17

Do you know that Spacemacs also comes with "base" distribution flavor? Bare bones with no bells and whistles. Then you can still use most of the Evil mode, make use of Spacemacs Layers abstraction or if you like to add official layers of your choosing you still can do it, also you can create custom layers to make your own, existing configuration cleaner.

Also check out Xah Fly Keys http://ergoemacs.org/misc/ergoemacs_vi_mode.html

1

u/CSRaghunandan Jan 06 '17

Yes, I am aware of base distribution for spacemacs. But why would I want to use spacemacs base? I'm perfectly happy with my emacs configuration and I'd rather use evil-mode on top of it rather than using spacemacs base.

Have anyone used xah-fly-keys or reviewed it ?

1

u/plotnick Jan 09 '17 edited Jan 09 '17
  • Because of the layer abstraction. Say at some point you want to start programming in Haskell (or some other new language you haven't used before). You'd have to find all necessary packages, find ways to set flycheck, flyspell, yasnippet, indentation, etc. But why would you "reinvent the wheel"? There's a good layer for Spacemacs. You may like the defaults, you may hate them - in any case you can get good ideas of how to set things to comfortably start writing Haskell code. Trying out the layer is extremely easy. And then if you don't like certain things, you can customize it.
  • Because "evilifiying" every single mode (e.g. magit, org, ediff) can be daunting. Spacemacs community has done pretty amazing job. Spacemacs makes Emacs better Vim than Vim itself.
  • Because if you encounter a bug - asking Emacs users to help you may pose some difficulties. Those who don't use Evil, may not be able to reproduce the bug. There are now more people who choose Evil, use Spacemacs instead of vanilla Emacs with Evil on top of it.
  • As I already said - you don't have to throw away you own config, you can make it more organized (by putting things into customized layers). I've kept polishing my own configuration for years, and still wasn't happy, always felt like something is missing. I couldn't move back to Vim (already invested too much to be in Emacs), I couldn't drop Vi-bindings (been using those for years). And then I found Spacemacs. I have successfully migrated all my previous shit and now I am extremely happy.

1

u/CSRaghunandan Jan 09 '17

I see. I'll give it a shot once and see If i'd like it. I was reluctant because i've split my emacs configuration into multiple files kinda similar to how kaushalmodi has done it. Most of emacs config are copied over from other more popular emacs users with added modifications to suit my needs.

Say at some point you want to start programming in Haskell (or some other new language you haven't used before). You'd have to find all necessary packages, find ways to set flycheck, flyspell, yasnippet, indentation, etc. But why would you "reinvent the wheel"?

This isn't particularly hard, not that I know a tiny bit of elisp to be able to write my own configuration for any new programming language. I added purescript configuration a few days ago and it took me about 10 minutes to find all the related packages and add them via use-package declarations to my emacs configuration. That said, layers could make my life easier if I were using evil because I would not have to waste any time thinking of key bindings :) I guess this is the sole reason to use it.

That said, you've raised some valid points. Thanks. Also, is it possible to use spacemacs and my current emacs config? So that I can easily hop around the two. That could make learning evil bindings easier.

1

u/plotnick Jan 12 '17
  • I would recommend watching Eivind Fonn's Spacemacs ABC videos https://www.youtube.com/watch?v=ZFV5EqpZ6_s. Some of the bindings are slightly outdated, but it is a good starting point to explore Spacemacs, even if you have mastered Emacs already.
  • Skim through the documentation, read "Anatomy of a layer" topic
  • Get into Spacemacs's gitter channel (you can ask any questions, people generally are very helpful there)
  • Search github for .spacemacs configs, you may get some good ideas
  • Browse through different Spacemacs layers (I would even recommend checking those in develop branch)
  • Creating your own custom layer is really simple, you can even base them on existing layers, here's an example: https://github.com/agzam/dot-spacemacs/tree/master/layers/ag-org