Am 20.01.2015 um 03:21 schrieb Chao Lu:
Dear list,
As a new user of evil, I love it a lot, but have some questions which I'm trying to tackle:
First, I want the emacs intial yank-pop back by: (define-key evil-insert-state-map (kbd "M-y") 'yank-pop) (define-key evil-normal-state-map (kbd "M-y") 'yank-pop) (define-key evil-emacs-state-map (kbd "M-y") 'yank-pop)
Evil defines its own version of `yank-pop` called `evil-paste-pop`, which is by default bound to C-p in normal state. The command `yank-pop` is remapped to `evil-paste-pop`, that's why your bindings do not work as expected (they call `evil-paste-pop`, not `yank-pop` because of the remapping). In contrast to `yank-pop` Evil's function knows how to handle Evil's own paste function (the command p and P, line wise and block paste, etc.). However, the downside is that you *must* use Evil's paste functions (and not the normal Emacs "yank" C-y). If you prefer Emacs paste you should remove the remapping, e.g. (define-key evil-normal-state-map [remap cua-paste-pop] nil) (define-key evil-normal-state-map [remap yank-pop] nil) should work.
How to make evil behave like emacs when call end-of-line. i.e.
There's a customization option M-x customize-variable RET evil-move-cursor-back RET Set this option to "off" (or set the variable to nil, (setq evil-move-cursor-back nil)). Frank