Questions tagged [evil]

Evil Mode is a Vim emulation layer for Emacs.

Filter by
Sorted by
Tagged with
1
vote
2answers
620 views

Evil-mode remap universal-argument to C-f in normal-mode, without weird C-u behavior

This .emacs file is sufficient to reproduce the problem. (package-initialize) (setq evil-want-C-u-scroll t) (require 'evil) (define-key evil-normal-state-map (kbd "C-f") #'universal-argument) (evil-...
3
votes
3answers
1k views

Make evil-mode more lisp friendly?

I'm asking for several tips to make editing lisp like languages in evil mode better. In particular there is one feature that I would really like but couldn't manage to get it to work. For example ...
2
votes
0answers
422 views

Quickly navigate path with evil-mode's ex commands?

I am new to Emacs. I like how I can easily navigate to a file via helm-mode-find-file in helm. Is there any way to combine any variant of this (helm or otherwise) with evil's ex commands (eg, :e, :sp,...
6
votes
2answers
893 views

How might I define (or fake) a mode-local ex command with evil?

It is possible to define ex commands using evil-ex-define-cmd. For example, :quit is defined as: (evil-ex-define-cmd "q[uit]" 'evil-quit) I'd like to override this behaviour in particular modes; in ...
0
votes
1answer
337 views

Call an evil-delete > evil-motion operation from elisp?

I want to execute evil-delete and then call a motion command. A simple example which does not work because evil waits for input after calling evil-delete: (defun does-not-work () (call-...
1
vote
1answer
296 views

How to “auto” repeat evil-yank?

I'm not from a vim background so I remap a lot of the evil commands and keys to fit my needs. I know you can use evil-repeat but I like the following better to quickly kill a few lines: (defun evil-...
1
vote
2answers
919 views

How do I change only what “dd” does in evil-mode's normal-state in a minor mode

When I press dd in haskell-interactive-mode at the prompt, it doesn't delete anything, because part of the line is read-only. I would like to map dd to 'haskell-interactive-mode-kill-whole-line. this ...
2
votes
1answer
493 views

Search/substition completion in Evil mode

In Evil mode, in the Normal state, with the evil-search-module variable set to Evil interactive search, I would like to use some kind of auto-completion functionality like Ctrl+n or Ctrl+p so that I ...
1
vote
1answer
611 views

How to delete word in next line with evil-mode?

I use evil-mode (from spacemacs) and I get a strange behaviour which I'm not sure if it is right or a bug. If I delete words (with dw, i think it calls evil-delete), it works until I arrive at the ...
0
votes
1answer
811 views

evil mode: how to move cursor in insert state?

I am trying out evil mode, and I want to rebind something to four arrows so I can move conveniently up-down-left-right when I am in insert state. In other words, which functions in emacs/evil that I ...
3
votes
1answer
544 views

Insert mode: make C-a insert previously inserted text

In Vim, Ctrl-A can be used in Insert-mode to insert previously inserted text, much as the "dot" (.) command can be used in Normal-mode. For context and a demonstration, watch from ~2m25s - ...
2
votes
2answers
1k views

Disable evil-mode in magit

I am newbie here, need some help. After upgrade magit to v2.1.0 this morning, i found some short keys are different from the early version. What bothers me is this: when I use some short key(for ...
0
votes
2answers
651 views

In shell, eshell and comint-modes, the cursor moves back one chacacter when I switch buffers

When I'm in a shell and I change buffers, if I switch back to the shell buffer, the cursor has moved back a character and I can't start typing new shell commands until I hit -> first. This happens ...
3
votes
0answers
589 views

disabling evil auto copying of selection to clipboard on frame focus

I'm seeing interesting behavior when I try to copy text between other applications and emacs on arch linux, when using evil-mode. Whenever I have a region selected in emacs, and then click to focus ...
1
vote
0answers
753 views

Some buffers don't allow evil mode commands

Switching to *Messages* causes evil-leader keys not to be used and :q tries to quit the whole emacs instance from this buffer, but not other buffers. Also the C-w c (to close pane) doesn't work ...
0
votes
1answer
492 views

How do I use the Evil-mode gg command in info?

Normally, thanks to the power of Evil, I can use the Vim gg command to go to the beginning of a buffer. When browsing info, however, typing g brings up a "Go to node: " prompt. I don't even know what ...
3
votes
1answer
344 views

Evil - how to set up keychords for Web-mode only?

I have the following setup for using comments: (key-chord-define evil-normal-state-map "cc" 'comment-dwim-2) This works fine. I can type cc to comment it out or comment out. However, Web-mode ...
5
votes
1answer
530 views

How do I jump to the next sentence in evil?

When i press ) in Vim it jumps to the next sentence. In evil, however, ) (evil-forward-sentence) at the beginning of the following paragraph takes you to the paragraph's end, while in Vim it jumps to ...
0
votes
1answer
114 views

restore cursor position iedit mode after narrowing with evil visul line

Iedit-mode can narrow the edit to a region, I am using evil-mode, evil-visual-line select region by whole lines, after narrowing the point is at the end of last line, is it possible to fix this ...
3
votes
1answer
747 views

How create keybindings for Evil command line?

For example, I have created a keybinding for Emacs mini-buffer, that will receive the [f9]-key as a confirmation (usually the RET-key). (define-key minibuffer-local-map (kbd "<f9>") 'exit-...
1
vote
2answers
1k views

evil mode with ggtags

I want to use evil mode with ggtags but evil mode keeps taking some of the bindings such as M-.. I'm new to emacs and I'm interested in learning what's going on. At first I tried explicitly setting ...
2
votes
1answer
478 views

Disable evil-mode in calendar

On the following setup: GNU Emacs 24.4.1 (i586-pc-linux-gnu, GTK+ Version 3.14.5) of 2015-03-07 on binet, modified by Debian Evil version 1.1.6 If I enter M-x calendar, I find that several of the ...
5
votes
1answer
970 views

How can I make C-g run both evil-force-normal-state and keyboard-quit?

With evil-mode, I found myself pressing escape very often, but it's a bit far to reach. Also, it seems semantic wise, keyboard-quit is similar to evil-force-normal-state, so I would like to use C-g ...
1
vote
1answer
223 views

Does a key-chord that looks to the first character, exists?

My setup GNU Emacs GUI (version 24.4.51.1 (x86_64-w64-mingw32) compiled from Harroogan Emacs.) Package key-chord.el Package Evil-mode Situation I use the Evil mode. I ...
3
votes
1answer
494 views

Vim/Evil keybindings in Magit 2.1

I love vim keybindings. For older versions of Magit, I used this to allow j/k scrolling: (define-key magit-status-mode-map (kbd "k") #'previous-line) (define-key magit-status-mode-map (kbd "K") #'...
3
votes
1answer
407 views

How does comint-mode override beginning of line behavior? I want same functionality to eshell

My Emacs version is 24.5.1. Comint-mode protects the prompt by somehow defining the beginning of line to start directly after the prompt regex. This works for normal motion commands like move-...
4
votes
3answers
1k views

Bind key to a prefix in evil

I have the following definition in my init.el: (define-key evil-motion-state-map (kbd "SPC j") #'evilem-motion-next-line) This works if I want to do dSPCj, but I'd like to be able to do SPCdj as ...
6
votes
1answer
1k views

Using cask for package management

I am new to emacs. I'm trying to use cask to manage emacs packages. This is my ~/.emacs.d/init.el: (require 'cask "~/etsi/cask/cask.el") (cask-initialize "~/etsi") (require 'evil) (evil-mode 1) ~/...
0
votes
1answer
1k views

Resolving keybinding conflicts with Evil-mode: Troubleshooting Image-Dired bindings

I am trying to move/rename 100+ images inside of a directory, so I am using Image-Dired to view the images as thumbnails and as I move/rename them. I want to move multiple images at a time, so I am "...
5
votes
1answer
316 views

How can I get VolatileHighlights to work with evil-yank, evil-delete, etc?

With the guide on extending Emacs, I discovered the volatile highlights package. But it only works on Emacs operations like kill and yank. I would like to use it with Evil operations like evil-yank ...
2
votes
1answer
314 views

Executing emacs shortcuts when keyboard is set to Greek

Writing Greek in emacs is proving to be quite inconvenient. If my keyboard is set to Greek, normal shortcuts do not work and I have to switch to latin just to navigate around the buffer. As an ...
1
vote
1answer
856 views

how to enter into visual block mode in evil on windows?

in VIM on MS Windows, I could use C-q to enter into visual block mode. How about in evil? I tried the same but it doesn't work.
1
vote
1answer
376 views

Using evil and elscreen together

I just started using evil-mode after having used elscreen for a long time. evil-mode will bind the C-z key to evil-emacs-state but do you know how I can rebind either this function, or the elscreen ...
0
votes
1answer
194 views

How do I bind a key to open or close a mode? (undo-tree)

I'm using evil (via spacemacs) and I want to bind <f2> to open and close the undo-tree (like vim-Gundo). I can successfully bind opening undo-tree-visualize, but I can't figure out how to quit. ...
6
votes
2answers
4k views

Evil: Is there a default register that does not get overwritten by later yanks to explicit registers?

I often use registers in evil, but I have a common use case that I cannot seem to resolve. I would like to have all copied text stored somewhere that does not get overwritten when I explicitly make ...
1
vote
0answers
352 views

Org Mode & Evil: Prevent editing of hidden text within collapsed subtree

I know that this can be avoided easily, in fact there is a previous question here that covered this matter before, but this only works if we are using Emacs without Evil or using Evil with the emacs-...
5
votes
1answer
4k views

How to set evil-mode to use evil-emacs-state-mode in new buffers?

So far, I've tried this, but it doesn't see to be working - new buffers still start in normal mode. I'd prefer to default to evils emacs mode, and be able to switch into evil with C-z when I'm ready (...
6
votes
3answers
2k views

Disable evil-mode when git-timemachine mode is activated

How do I disable evil-mode in a buffer in which git-timemachine is activated?
2
votes
0answers
772 views

How to disable the map from esc to meta?

I installed the oh-my-emacs configuration and try to use emacs in the terminal. oh-my-emacs configuration enables evil-mode in default, and my problem is that, I found esc is mapped to meta, while ...
9
votes
1answer
2k views

How can I add a new colon-command to Evil?

evil-mode introduces vim-style colon commands (such as :wq to save and close). I have a few commands (such as kill-buffer, org-babel-tangle) that I'd like to be able to run through this instead of ...
0
votes
1answer
411 views

How to use evil in emacs 24.4?

This bug currently prevents me switching to 24.4: https://bitbucket.org/lyro/evil/issue/437/m-x-is-undefined-in-emacs-244 Is there a workaround to make both evil and M-x work in 24.4?
2
votes
1answer
90 views

How to make evil keymaps inherit from other evil keymaps?

I changed the i key binding in evil-normal-state-map to go up and k to go down (these are just two examples). But evil-operator-state-map and evil-visual-state-map do not change accordingly, but keep ...
3
votes
1answer
280 views

Map a Key to an Evil Operator and to Other Things?

For example, in in lisp-mode, I want to be able to use d as normal but also remap something like "dh" to something like "sp-splice-sexp-killing-backward". In vim you can remap keys like this without a ...
4
votes
2answers
535 views

zs and ze from Vim?

I use evil-mode, but it doesn't support zs and ze shortcuts from Vim (scrolling horizontally to cursor position). How can i map these keys to achieve the same behavior in Emacs? Some explanation of ...
1
vote
1answer
284 views

“S” key throws error in Evil mode normal state [closed]

I really like typing in vim, but vimscript makes zero sense. Since I'm getting interested in Lisp/Clojure, and I've heard nice things about evil mode for emacs, I thought I'd give it a try. ...
13
votes
3answers
3k views

Is there an equivalent to sed-style substitution commands from vim?

One of the things I miss from vim is being able to type in a substitution command that will work over multiple lines, for example: :/begin/,/end/s/foo/bar/g The above command substitutes "foo" for "...
1
vote
1answer
110 views

Advising evil-forward-char seems to trigger advice twice

I am trying to update annoying-arrows to work with evil-mode. Annoying arrows is this minor-mode that complains when you use the same simple movement-command too many times in a row. (I have also ...
2
votes
1answer
805 views

Attempt at remapping evil only remaps some of the keys

I'm attempting to change the mapping of evil mode, and I have placed the code below in my .emacs file. When I start emacs some of the keys have been remapped, while others have not These keys got ...
10
votes
1answer
4k views

Evil cursor change by state

Until today, when I was in the normal state in evil, the cursor was a block, and it would switch to an I-beam when in insert state. Something changed, however, and the cursor is now always the I-beam....
1
vote
0answers
156 views

Evil-mode text objects not working in python.el's python-mode

This only happens in python-mode. When I try to use a text object to, for example, change everything inside or around some brackets (eg ci() it instead edits the first line of the file. So if I have ...

1
6 7 8
9
10