plugins - Evil Emacs: is there a way to disable vim-like keys in «insert» mode? -
plugins - Evil Emacs: is there a way to disable vim-like keys in «insert» mode? -
i vim thought of text objects, installed evil plugin emulate vim features in emacs. wanted time entered «insert» mode leave standard emacs keybinds unchanged (perhaps exception «esc» allows homecoming «normal» mode). i'm wonder, there way it?
by way: in nowadays moment «insert» mode have mixed set of hotkeys, isn't comfortable either way. i.e. «m-b» works in emacs, «c-o» works in vim.
upd: in #emacs irc channel told me solved similar problem, and laid code github. here's relevant part:
(require 'evil) ;; remove keybindings insert-state keymap (setcdr evil-insert-state-map nil) ;; [escape] should switch normal state (define-key evil-insert-state-map [escape] 'evil-normal-state) (define-key evil-insert-state-map (kbd "jk") 'evil-normal-state) (define-key evil-insert-state-map (kbd "jj") 'insert-jay) (defun insert-jay () (interactive) (insert "j")) (evil-mode)
also added code (provide 'emvil)
allow require '
ing it, , (global-set-key (kbd "c-s-z") 'undo-tree-redo)
bind redo command.
this code improve 1 in old reply old 1 breaks binds. e.g. called electric indentation in c refused work old.
plugins emacs configuration editor elisp
Comments
Post a Comment