Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [evil]

Evil Mode is a Vim emulation layer for Emacs.

9
votes
2answers
1k views

Possible not to use undo-tree in evil mode?

Every so often I run into bugs in undo-tree, where I can't redo, with the following known bug, another report & reddit thread. primitive-undo: Unrecognized entry in undo list undo-tree-canary ...
0
votes
1answer
764 views

How to define mode-specific keys in evil-mode? [duplicate]

I want keybinding X to do one thing in c-mode and another thing in other modes. I'm trying to figure out how to do this in evil, specifically evil's insert-state. I tried setting the keybinding in a ...
2
votes
1answer
523 views

How to do case sensitive searches using evil's evil-search?

Unlike isearch, evil-search mode ignores case-fold-search option. Using evil-search like this for eg: (setq-default evil-search-module 'evil-search) Is it possible to make evil-search case ...
1
vote
2answers
430 views

History of search terms for evil mode?

When searching for text in evil mode using / key, then entering text. The value searched for isn't saved as it is in vim, where the up/down arrow keys can cycle search history. Is it possible for ...
1
vote
1answer
929 views

How can I disable evil in help-mode?

I have the following in my init.el, and it does a great job of automatically disabling evil in certain emacs modes: (dolist (mode '(git-rebase-mode flycheck-error-list-mode inf-ruby-...
0
votes
2answers
145 views

Disabling reusage of evil scroll count

If evil-scroll-line-down is not given a count argument, the last count is used. This is not the behaviour of vim, which scrolls one line if no count is specified. How can I get vim behaviour?
0
votes
0answers
168 views

How to reset the contents of evil-mode registers?

The problem is that vim registers are persitent by nature and the same features in spacemacs causes the content to be placed in a file, whenever I open a new file. Most of what I can convey regarding ...
2
votes
1answer
85 views

How to configure the delimiter for evil-search-word for C/C++ modes? [duplicate]

Using evil mode, pressing * runs evil-search-word-forward. But for some reason C/C++ mode uses _ as a delimiter, meaning ID_FOO will only match the first term ID when searching for the next term. ...
7
votes
1answer
2k views

Differences between evil-normal-state-map and evil-motion-state-map

Documentation for evil-normal-state-map: Keymap for Normal state. Documentation for evil-motion-state-map: Keymap for Motion state. Does Vim have a so-called "motion mode"? In Vim, executing :...
1
vote
1answer
833 views

Spacemacs - start popup terminal window in evil-normal-state

I've added these keybinding configuration in my Spacemacs dot file, so that I can toggle the terminal by press the \ key. ;; Keybindings (define-key evil-normal-state-map (kbd "\\") 'spacemacs/...
2
votes
1answer
312 views

Executing programs the efficient way with Spacemacs

I'm a Vim user trying to learn Spacemacs. In Vim, I execute a Scheme program by typing :mit-scheme < xxx.scm. After the program exits, I can continue editing simply by press Enter. However, doing ...
1
vote
1answer
428 views

How do I change the mode indicators for evil-mode in the spaceline mode line package?

The mode line shows <N> or <I> or <V> and I would like it to show NORMAL, INSERT, VISUAL, etc. I'm new to Emacs so my Elisp skills are non-existent.
4
votes
1answer
832 views

how do I do case sensitive searches using evil/spacemacs?

I'm trying to perform a search and replace in spacemacs but I need it to be case sensitive when by default it appears to be case insensitive. So I try to do :set noignorecase but then I have this ...
2
votes
1answer
83 views

Evil-leader stops working when I eval-buffer

If I load up emacs and go to my .emacs file (a fragment of which is given below), and I press SPC f or C-c C-f then it does find-file, which is the expected behaviour. However, if I type M-x eval-...
0
votes
1answer
311 views

Leave evil insert mode with control key

Is it possible to use the control key to exit Evil's insert mode? I'm currently using the following code to do it with TAB, but since control only seems to work as a modifier key, I'm not having any ...
2
votes
1answer
533 views

Why is my “repeat last action” (dot) operator is not working?

I'm a vim user moving to emacs evil. I just added this line to my .init.el file and it broke my dot functionality. (define-key evil-insert-state-map (kbd "TAB") 'evil-force-normal-state) Why? I'm ...
1
vote
1answer
276 views

How to remap the tab key in emacs evil mode to act as escape key? [duplicate]

This took me way too long to figure out so I'm asking the question and answering it. In my .emacs/init.el I was trying many things: (with-eval-after-load 'evil-maps (define-key evil-insert-state-...
5
votes
3answers
305 views

How can I implement Vim's `undo line` command in Emacs' evil-mode?

From the Vim User Manual: 02.5: There's a special version of the undo command, the "U" (undo line) command. The undo line command undoes all the changes made on the last line that was edited. ...
1
vote
1answer
59 views

Highlight with Evil's `:g` command

Evil has a beautiful :s(ubstitute) implementation, which shows the regexp inline as you type: However, the feature doesn't exist for the global command, :g (such that :%g/emacs/... will find the line ...
1
vote
2answers
1k views

Neovim inside of Emacs as an alternative to Evil mode

I'm a current Neovim user who happens to be interested in Emacs. I like Org mode, as well as some other features of Emacs. However, every time I've tried to use evil mode, it's felt crippled. (The ...
0
votes
1answer
430 views

How to quit key sequence using evil / spacemacs?

I'm using spacemacs in evil mode and I'd like to remap my escape key to the right arrow key (It's easily accessible for me due to a global remapping which is useful in another application). I had most ...
1
vote
1answer
81 views

How can I abort key sequence with the escape key in Evil?

When I enter C-x ESC I want the sequence to stop or cancel and I don't want Evil to wait for the next key or key chord in the sequence. Is there a way to achieve that?
0
votes
0answers
142 views

web-mode-indentation wrong

Using web-mode and evil I get a really strange behaviour when pressing return after curly braces: let StubMapsService = Ember.Service.extend({ getMapElement(location) { (RET) } }); let f ...
4
votes
1answer
229 views

evil-surround: change and delete not working with all surroundings

I'm using GNU Emacs 24.5.1 (GUI version) on Mac OS X 10.11.1 with Evil mode and installed evil-surround through the built-in package manager of Emacs. Now, I can add all surroundings, for example, ...
0
votes
1answer
67 views

What's missing here

I've got this from a YouTube video about Evil mode but I can't see the entire init file, so I think it's incomplete because it gives me an error. The idea is to disable Evil mode in some modes. This ...
1
vote
2answers
299 views

Evil vs Slime: fight for “M-.”

Slime (and elisp-slime-nav) uses M-. to navigate to the symbol at point, and M-, to pop back to previous marks. I like this. Evil uses . to repeat the previous editing command, C-. to replace a just ...
0
votes
1answer
111 views

How to jump out of any surrounds?

Not just parenthesis, but any surround. We are given the advantage of a pair being made and the cursor conveniently placed within. That's only 1/2 the procedure; what about jumping out? Previous (...
1
vote
1answer
144 views

How can I change yank/delete to show relative line numbers during the yank/delete in evil?

I use evil via spacemacs. When I use yank, it’s mostly whole line numbers – like y20y. To a lesser extent, this is often true of delete – d10d Is there anything I can add to my Spacemacs config to ...
1
vote
1answer
196 views

How to toggle whitespace mode in evil insert state?

I'd like to disable whitespace-mode while in evil insert state. The following hooks work, but require refreshing all font colors with (font-lock-fontify-buffer), and even then- sometimes it fails to ...
1
vote
1answer
74 views

Get rid of evil's state info such as ` — INSERT — ` in the echo area

How can I get rid of the state information of evil in the echo area? I've already displayed it in the status bar and there is no need to occupy the echo area.
1
vote
1answer
167 views

In evil-mode, how can I configure the seeking forward behaviour for all text objects?

I'm trying to understand the seeking behaviour in evil-mode. suppose you have this ([|] is point): thi[s] is a text with a 'quote' -> command: ci' this is a text with a '[|]' Evil seeks forward ...
0
votes
1answer
47 views

What does refeer evil-mode ^ (carry)'s mark to ? (shown in :marks list)

I Think I have an idea, unless i want to be sure. According to vim.wikia.com, [ and ] marks in vim refers to beginning/end of previously changed or yanked text, but there is no built-in ^ mark. I ...
2
votes
1answer
520 views

How to check the current state in evil mode?

When writing elisp for evil mode, how can you check the currently active evil state?(normal, visual, insert... etc)
0
votes
2answers
244 views

Configure smartparens wrapping to work in evil-visual-state?

I've been migrating from Vim to Emacs in evil mode, and I'd like to use smartparens. I know there's a port of surround.vim, but I've always found surround.vim awkward to use, so I'd like to explore an ...
1
vote
1answer
193 views

Mapping evil normal state Y to y$

How can I redefine evil normal state Y to be equivalent to y$ instead of yy?
0
votes
1answer
85 views

Shifting org headlines in evil insert state

With the org-evil package, normal state > on a headline executes org-evil-demote, but on normal text it executes evil-shift-right. Two questions: (1) How does this work? (2) It would be nice (...
2
votes
1answer
733 views

Spacemacs - Changing evil keys (swapping)

I use a different keyboard layout (colemak) so standard evil keys are a bit annoying. Is there a way to swap keys globally (minus when writing text)?
3
votes
1answer
259 views

Enter regular command in evil insert state?

I'm using evil (specifically via spacemacs). Is there a way to enter a regular command without leaving insert state? For example, running SPC i u (for adding unicode character) while still in insert ...
1
vote
2answers
226 views

Go to last session's last edit

In vim, right after opening a file, I can type g; to go to the place last edited. This doesn't work in evil-mode with my configuration. Is there something I can do to make it work?
0
votes
1answer
958 views

How to make <tab> work in org mode when combined with evil mode?

In evil mode, I would like C-i not to work as a tab key, which is the default behavior in Emacs. Also, I would not have the default vi behavior simulated in Emacs evil by evil-jump-forward, but ...
2
votes
3answers
710 views

In Evil mode, how can I prevent adding to the kill ring when I yank text, visual mode over other text, then paste over?

If I have text1 text2, I yank text1 with yw then I highlight text2 with vw and paste overwrite that text with p, my kill ring now has text2. I'd prefer if text2 wasn't added to my kill ring because ...
3
votes
2answers
921 views

How do I paste code without auto indentation

I just setup the latest Spacemacs. I'm pasting python code from here https://raw.githubusercontent.com/jpmens/mosquitto-auth-plug/master/examples/http-auth-be.py into a new buffer. When I do this it ...
1
vote
1answer
2k views

How to make evil-mode tab key indent? (not re-indent based on context)

Currently pressing TAB in evil insert mode, runs indent-for-tab-command I'm not sure of the exact details, but from what I can tell this is performing some kind of re-indentation, which does nothing ...
1
vote
1answer
255 views

How to make evil-mode completion case sensitive?

While this answer (How to make auto-completion case sensitive? - ac-ignore-case) works in some cases. Using evil mode on its own. Adding (setq ac-ignore-case nil) to ~/.emacs doesn't make completion ...
1
vote
3answers
281 views

how to supply universal-argument (C-u) to a function call inside a binding statement [duplicate]

I have this on my init.el ;; magit status (define-key evil-motion-state-map "gs" 'magit-status) But I would like to have another binding, for C-u M-x magit-status (C-u is the universal-argument) ...
9
votes
1answer
1k views

Evil mode and regular expressions

In Vim, if I want search for all variable names LX where X is a number, I can simply type /L\d. However, this doesn't seem to work with evil. Is there another syntax for regular expressions in Evil ...
1
vote
2answers
131 views

What's the difference between :w and :sav in spacemacs?

I'm using spacemacs and while when I create a new buffer with a given name and try to save it into a real file I find that :w won't work but :sav will. What is the difference between those two ...
1
vote
0answers
39 views

paredit-forward-up won't cross line boundary

(a b (c |d) e f) C-M-n works as I would expect, producing this: (a b (c d)| e f) But if I break the line after the (c d) like so… (a b (c |d) e f) The same C-M-n does absolutely nothing. ...
1
vote
1answer
192 views

Can evil-visual-block show inserted text on all lines like string-rectangle does?

In regular (non-evil) emacs, if you select a rectangular region and hit C-x r t to run string-rectangle, inserted text is displayed on all the selected lines as you type. In Vim, if you select a ...
0
votes
0answers
118 views

In Emacs, what is the equivalent of Vim's “nowrap” setting? [duplicate]

In Vim, I can view extremely long lines as if they are "wrapped" or just view as much of the line as fits across the width of the screenturn off the apparent wrapping of lines so that I only see one ...