Stack Exchange Network

Stack Exchange network consists of 175 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.

2
votes
1answer
95 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. ...
9
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
879 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
327 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
461 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
891 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
90 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
334 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 ...
3
votes
1answer
589 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
301 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-...
6
votes
3answers
320 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
63 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
472 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
87 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
149 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
252 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
69 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
321 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
119 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
151 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
201 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
81 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
173 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 ...
3
votes
1answer
562 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
255 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
198 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
87 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
761 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
271 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
241 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
1k 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
783 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
979 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
269 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
312 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
2k 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
138 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
41 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
199 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 ...
5
votes
3answers
310 views

Org-mode: closing the nearest parent

I often find I want to close the nearest parent subtree, but don't know of a better way of doing this than navigating to the header first and then pressing tab. I use evil-mode, so properly this ...
1
vote
0answers
97 views

How to setup keyboard for Normal mode in Evil [dvorak user]?

I am using a dvorak keyboard and Evil Mode. I would like to keep the qwerty keys while in Normal mode. And wonder if there is a more efficient way than remapping everything. I found this post that ...
0
votes
1answer
76 views

How to limit keybinds to normal mode and not to override keybinds in minibuffer?

I've keybinded &é"'... to selecting windows: (global-set-key (kbd "²") 'select-window-0) (global-set-key (kbd "&") 'select-window-1) (global-set-key (kbd "é") 'select-window-2) (...
3
votes
1answer
1k views

How to remap : to ; in Evil Mode

What's the Evil Mode equivalent of these Vim commands? nnoremap : ; nnoremap ; : vnoremap : ; vnoremap ; :
1
vote
1answer
55 views

Match separated comments in evil mode

everyone, I need that emacs matchit in evil mode works like that one works in vim. Let me explain. I have this lines of code ; {{{ matchit (unless (package-installed-p 'evil-matchit) (package-...
0
votes
1answer
128 views

Binding modified key in evil mode

I wanted to bind M-n to transpose-chars in evil insert state, and tried (define-key evil-insert-state-map "M-n" 'transpose-chars) But that didn't work. What should I do?
1
vote
2answers
724 views

Enable evil in specific modes

I want Emacs to default to Emacs bindings, but to be able to define a list of modes in init.el that enable evil-mode. I want something similar to this: http://wikemacs.org/wiki/Evil#...
5
votes
4answers
215 views

Globally replace C- with SPC

I want to globally replace C- with SPC in emacs. This should make almost all emacs bindings not awful chords, and should completely avoid colliding emacs with evil/vim. It should also be able to be ...