Contents
How to insert into evil mode in 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:
What’s the best way to use evil mode?
I use evil-leader and use “,xm” to replace “M-x”, so I seldom press Alt key. There is also general.el which supports multiple leader keys. evil-matchit, press “%” to jump between tag pair. avoid using ESC key, you can press “kj” instead. Have faith in free software!
How to set the initial state of evil?
Evil maintains an association between major modes and their corresponding states, which is most easily modified using the function evil-set-initial-state. Set the initial state for major mode MODE to STATE . This is the state the buffer comes up in. If no state can be found, Evil uses the default initial state.
When to ignore visual line mode in evil?
If non-nil, visual-line-mode is generally respected when it is on. In this case, motions such as j and k navigate by visual lines (on the screen) rather than “physical” lines (defined by newline characters). If nil, the setting of visual-line-mode is ignored. This variable must be set before Evil is loaded.
How to abort recursive edits in Emacs?
Keep in mind, I am rebinding stuff that real emacs users would consider heresy, so YMMV if you ever want to learn “real” emacs (I really don’t). ;;; esc quits (defun minibuffer-keyboard-quit () “Abort recursive edit.
How to set evil move cursor back in vimrc?
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.
What is the hotkey for evil nerd commenter?
The hotkey is “,cl” in evil-mode and “M-;” in all modes. “M” means ALT key. If a region selected, the region is expand to make sure the region contain whole lines. Then we comment/uncomment the expanded region.
How to define key bindings in Evil Mode?
Insert (evilnc-default-hotkeys) into ~/.emacs to use key bindings preset for both evil and non-evil mode. This is recommended way. Use (evilnc-default-hotkeys t) to use key binding only for non-evil mode if you want to define key bindings in evil-mode by yourself.