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

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.

What has been amazing so far is that even after using vim for almost 3 years, I'd been sort of afraid of diving deep into the config system (I made do with copy-pasting some popular vimrc files) and it was good enough, but in the short span of 2 days, I've actually gotten to know more about emacs configuration style than I ever did about vim. And I suspect it will only get better as I start to learn Emacs Lisp.



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.


I haven't dived into the details of Evil mode too much. The basic Vim motions and commands work out of the box, so for a casual vim user, it ought to be enough. I also went ahead and installed Evil-leader, so I could have the same <leader> keymaps that I have in my vim config.

A few places where I looked for small things here and there:

1. http://www.emacswiki.org/emacs/Evil

2. https://github.com/cofi/evil-leader

3. https://stackoverflow.com/questions/8483182/evil-mode-best-p...

4. https://github.com/mixandgo/emacs.d/blob/master/my-evil.el

5. https://bling.github.io/blog/2013/10/27/emacs-as-my-leader-v...

And I also got ido-vertical-mode so the emacs command buffer looks better.

Here's my setup: https://github.com/mgill25/emacs See user.el

Cheers!

PS: Some of the configuration needs to be set up before you activate certain modes - which is often implicit in plugins, so watch out for that. Eg: To emulate C-u behavior, the functions had to be put ahead of the (require 'evil) call in evil-leader.el


I'm using stock evil mode with tidal on emacs. It's pretty good, but occasionally I'll open up a weird window. I used emacs in the late 90s, so I'm not completely afraid of it. I recommend that you shouldn't be either. You can use v to select sections and then just C-c C-c to run them. Nothing crazy. Navigate around with standard vim keystrokes, including the windows.

For that matter, getting SLIME w/ vim to work w/ Tidal wouldn't be the hardest thing. It's just that no one has tried.


What problems are you facing? Setting up evil mode takes just what the emacs wiki says.

1. Install emacs. Start emacs. "Alt-x package-install" press enter "evil" press enter.

2. Open your .emacs or .emacs.d/init.el.

  (require 'evil)
  (evil-mode 1)
Done.


Biggest problem for me when I first used evil was learning that C-g is what I need to press when I accidentally hit an emacs chord sequence and want to abort. I had to google a few times to find that out when Esc wouldn't get me out of the minibuffer.


My favorite article these days on the differences between Vim and its composability and Emacs-style editors is "Why Atom Can’t Replace Vim”: https://medium.com/@mkozlows/why-atom-cant-replace-vim-43385....




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

Search: