I started to use Evil a month ago; before it, I tried to use viper/vimpulse without much of success. To be honest, vimpulse is quite nice, but using it with various modes was a bit troublesome (e.g. compilation mode where vimpulse went always crazy) leaving emacs in some mode between vi-emacs-something.
When I switched to Evil, I finally started to explore full Emacs power, and believe me, I didn't regret. Evil works nicely in all modes I used (mostly editing, compilation, scratch and eshell) and even reading info/man/help is working without any problems.
Except that, I only found buffer switching odd as I used to do :b<0-9> instead :b-TAB-then-complete-name or :bn. Note however that Evil developers tries (in some cases) to reduce duplicate functionalities, so instead :! (to exec shell command), you should use native M-!.
If you find urge to add/redefine some custom ex commands, just open evil-maps.el and edit it (try that in vim!).
Evil is still young but promising project and I'm waiting the day when will replace viper in official Emacs distribution.
As someone who came from emacs, tried vim, and realized there were a huge number of things to gain, I did a lot of experimenting when I first started using evil. While the following are controversial, I wanted to keep the emacs keys that are used more universally in terminal, firefox, cocoa, etc..., but didn't want to lose the vim editing capabilities. I ended up deciding to rebind the following keys in my .emacs:
Also, if you are coming from vim and want a quick path from insert to normal mode using "jk" (or any other 2 stroke combination), the best way is to copy the text from http://www.emacswiki.org/emacs/download/key-chord.el and paste it into your ~/.emacs.d/key-chord.el . Then add the following to your .emacs:
;load a file named key-chord.el from some directory in the load-path (e.g. "~/.emacs.d")
(require 'key-chord)
(key-chord-mode 1)
(key-chord-define-global "jk" 'evil-normal-state)
Also, if you are coming from vim and you think the copy-to-clipboard in emacs is no good, you're probably right. However, you may find the following useful after running sudo apt-get install xsel:
(defun copy-to-clipboard ()
(interactive)
(if (display-graphic-p)
(progn
(message "Yanked region to x-clipboard!")
(call-interactively 'clipboard-kill-ring-save)
)
(if (region-active-p)
(progn
(shell-command-on-region (region-beginning) (region-end) "xsel -i -b")
(message "Yanked region to clipboard!")
(deactivate-mark))
(message "No region active; can't yank to clipboard!")))
)
(evil-define-command paste-from-clipboard()
(if (display-graphic-p)
(progn
(clipboard-yank)
(message "graphics active")
)
(insert (shell-command-to-string "xsel -o -b"))
)
)
(global-set-key [f8] 'copy-to-clipboard)
(global-set-key [f9] 'paste-from-clipboard)
Obviously, you will have to decide for yourself whether any of these controversial changes are worth it, but perhaps these basic changes will inspire you.
For some other really cool function implementations, such as delete and paste, delete without copying to clipboard, efficient 4x / 16x movement, use of counts for paste register specification, tab settings that actually work for c/c++, and more, you can check out the full .emacs, init.el, my-keymaps.el, and my-functions.el versons on my git at https://github.com/Russell91/emacs
I like to save the buffer when I exit the insert-mode:
(edited: do not ask to save when there is no associated file for this buffer, like when in a scratch or a magit buffer)
Have faith in free software! Nothing is impossible with Evil which combining the power of Vim and Emacs. For example, many people assume that Evil keybindings conflicts with existing plugins Emacs without heavy re-binding. That's wrong actually
Coming from the emacs side, I very much prefer M-. to be go-to-definition, but the function that runs on M-. differs across modes. I could override it in the regular way with (define-key evil-normal-state-map (kbd "M-.") 'foo) where foo checks the current major mode and runs the appropriate function, but that sounds like it'd require lots of hardcoding. A more general solution is this:
Other than that, I like the plugins evil-surround (though I feel smartparens is a more complete solution) and evil-leader.
I used to use key-chord to map jk to ESC like I've learnt to do in vim, but it insisted on treating kj as the same as jk, so instead I'm using the following:
(defun evil-escape-if-next-char (trigger)
"Watches the next letter. If `trigger', then switch to normal mode,
otherwise keep the previously inserted key and forward unpressed
key to `unread-command-events'."
(self-insert-command 1)
(let ((next-key (read-event)))
(if (eq trigger next-key)
(progn
(delete-char -1)
(evil-normal-state))
(setq unread-command-events (cons next-key unread-command-events)))))
(defun evil-escape-if-next-char-is-k (arg)
(interactive "p")
(if (= arg 1)
(evil-escape-if-next-char ?k)
(self-insert-command arg)))
(eval-after-load "evil-autoloads"
'(add-hook 'evil-after-load-hook
(lambda ()
;; … other stuff …
(define-key evil-insert-state-map (kbd "j") 'evil-escape-if-next-char-is-k))))
I use (setq evil-move-cursor-back nil) which isn't very vimmy (although apparantly you can make your vimrc do that as well), I just never got used to the cursor moving back after exiting insert.
Practical tip: use evil-local-mode-hook for stuff like lazy loading evil-surround-mode, it won't help to put it in plain evil-mode-hook. So if you install evil and evil-surround with package-install, you can have it start when you do M-x evil-mode by doing
(Of course, if you always run evil-mode and always have evil installed, there's no need for that autoload stuff, but I prefer to have my .emacs be general enough that I can use it on machines with old emacsen or without having any elpa packages installed.)