Questions tagged [evil-mode]

Evil (Extensible Vi Layer for Emacs) is a vim emulator for emacs

Evil is a reasonably full-featured and extensible vim emulator for emacs. It may be considered the successor to both Vim Mode and Viper/Vimpulse

Evil home page

183 questions
9
votes
1 answer

How to get easy nav window motions in evil-mode?

In vim I have this in my .vimrc: " Easy window navigation map h map j map k map l How do I get the easy window nav in evil-mode? Also, in vim "+ will copy to my system clipboard? This doesn't seem to…
Justin Thomas
  • 5,680
  • 3
  • 38
  • 63
8
votes
3 answers

How to copy text in Emacs Evil-Mode without overwriting the clipboard?

This post described how to do it in Vim, where one prefixes their copy command with " + (ie k). How can I do this in Emacs Evil-Mode? For example, I tried the following: yy - copy first line to clipboard jjj - move to some new…
modulitos
  • 14,737
  • 16
  • 67
  • 110
8
votes
1 answer

Emacs copy region/line and comment at the same time

I am trying to implement the following: duplicate the currently selected region or a line (if there is no selection) and comment out the original region with the help of comment-or-uncomment-region-or-line. I figured I could use kill-region…
egdmitry
  • 2,071
  • 15
  • 18
8
votes
1 answer

How to map j and k to gj and gk in Emacs Evil-mode?

I would like to map j k motions in evil to be gj and gk respectively. This is a common remapping people usually do in vim. How can I do that in Emacs. I guess I just need to find how these Evil functions that correspond to gj and gk motions are…
egdmitry
  • 2,071
  • 15
  • 18
8
votes
2 answers

Org-mode capture and Evil - go into insert mode automatically

I'm using org-mode capture to create small notes and todos. I'm also using evil-mode. What I'd love to do is to automatically go into insert-mode when I go into a capture. I've tried adding a hook to org-capture-mode-hook and running (evil-insert)…
bbbscarter
  • 188
  • 4
7
votes
1 answer

Emacs Evil mode and org-mode

I have recent started using emacs, Evil and org-mode together. When taking notes in org-mode sometimes the program will go into an < E > mode which I can see on the status bar at the bottom of the frame. When starting emacs I usually see a < N > on…
user3834928
  • 131
  • 1
  • 7
7
votes
1 answer

Key map for ex command in emacs evil-mode

In emacs evil-mode, how do I bind a key sequence so that it pre-populates the evil-mode ex command line and positions the cursor? In vim, I can do this: nnoremap g/r :%s//g In emacs, I tried this (and several variations): (define-key…
Justin M. Keyes
  • 6,679
  • 3
  • 33
  • 60
6
votes
1 answer

When should I use `require` a package which is `autoload`?

For example, evil is autoload, Some blogs/threads will use (require 'evil) (evil-mode 1) to enable evil mode. AFAIK, Elisp is lisp2 and evil-mode is also a function, so doesn't need setq. (defadvice evil-mode (after start-evil activate) "Enable…
Chen Li
  • 4,824
  • 3
  • 28
  • 55
6
votes
2 answers

Mode-specific or buffer-local text objects in evil?

Q: in Emacs, how does one make mode-specific key bindings for text objects in evil? One may bind a key in a specific state (normal, insert, etc.) in a specific mode as the following example demonstrates: (evil-define-key 'normal org-mode "a"…
Dan
  • 5,209
  • 1
  • 25
  • 37
6
votes
3 answers

How to disable Emacs Evil selection auto-copies to clipboard

Related to this question: How to disable x paste in emacs This works for the mouse (setq mouse-drag-copy-region nil) How do I do the same for Evil mode in emacs? I'm on Mac OS, running Emacs 24.2.91.
justingordon
  • 12,553
  • 12
  • 72
  • 116
5
votes
3 answers

How to map jh and fd to in Doom Emacs?

I'm aware of evil-escape-sequence but from what I can tell, you can only have one keybinding set to it. I want fd and jh both to bring me to Normal state from Insert state. I've also tried something like (map! :i "jh" #'evil-normal-mode) but with…
Jean
  • 53
  • 1
  • 5
5
votes
1 answer

Emacs evil: general window movement remap

This is the question I should have asked instead of this: Emacs evil: space as a prefix key in motion state I want to define a bunch of commands for moving, moving between, opening and closing windows and buffers that works in all states except…
fhyve
  • 323
  • 2
  • 13
5
votes
2 answers

Spacemacs escape key needs delay to work

I have clean install of spacemacs. When I press escape to enter normal mode then immediately press u it will uppercase a word. If I wait a second, it will undo last action. I'm assuming this is evil-mode or emacs key-chord feature in action. How…
sevo
  • 4,559
  • 1
  • 15
  • 31
5
votes
2 answers

Emacs, Evil-Mode: Replace only in visual selection/visual block?

By default, :s/[search-term]/[replace-term] works on whole lines rather than on visual selections. For example, if you select between c and e, as such: a b |c d e| f g and do :s/ //g, the result is: abcdefg rather than a b cde f g Similarly, in…
spacingissue
  • 497
  • 2
  • 12
5
votes
3 answers

Bind C-z in evil mode to escape to shell

In Emacs evil mode, the key combo C-z is to toggle evil mode. I would like to rebind it to escape to shell instead. How would I do this ? I have read about eshell, it seems to be great, but for now I would like to work with my zsh shell…
Dzung Nguyen
  • 9,152
  • 14
  • 65
  • 104
1
2
3
12 13