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.

3
votes
0answers
37 views

xref gets confused by similar class names

If I use evil-jump-to-tag or xref-find-defintions on an inherited class module whose name is the same as a class in my current project, I am taken to the definition in the current project. I would ...
3
votes
0answers
83 views

Evil: How do I see the partial command I've been typing?

Suppose I am in command mode, and I am in the process of typing 3dd to delete three lines. How can I make evil mode show the (partial) command I have typed so far? In other words, is there an evil ...
3
votes
0answers
201 views

How to start a new line

I use Emacs with Evil mode, and I'm starting new line with key o. But I prefer to stay in Evil's normal mode, without going into Evil's insert mode, when starting a new line. When reading the called ...
3
votes
0answers
447 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 ...
2
votes
0answers
17 views

Letting evil >> increment org level

In evil mode, >> increments the indentation level of the current line. It does so at an org heading too, even though it would be more appropriate there if it would increase the org level (the ...
2
votes
0answers
217 views

Distraction free writing mode and vertically centered?

One feature, that I really adored in Ulysses is it's typewriting scroll center lock mode (for the lack of a better description). It would keep the line centered, no matter if the cursor is at the ...
2
votes
0answers
302 views

How do I make evil-search-forward / evil-search-backward use fuzzy search?

I'd like to search in buffer with the same fuzzy style that turns the search string into a regexp that splits characters and joins them with .*, like in Helm command search. Is there a way to do this ...
2
votes
0answers
76 views

Automatic close evil-make buffer

I'm using evil mode (Spacemacs to be specific) and working with LaTeX projects. I use evil-make or :make command to compile the current LaTeX project to PDF file. I find it quite annoying that ...
2
votes
0answers
176 views

Trace Evil-mode commands

At the moment, I only know one way to determine which Emacs functions are called by any given Evil command (e.g. a sequence of key bindings in the Normal state): read the Evil source code. Is there a ...
2
votes
0answers
203 views

Evil: how to execute multiple commands at command line?

I want to execute a list of commands all at once in the evil's command line. In vim, you can use the pipe to execute multiple commands, like this: %s/ó/o/g|%s/ç/c/g How can I do this in evil?
2
votes
0answers
401 views

Turning relative numbering on (with linum-relative) in Spacemacs only when in normal mode

In Vim I have relative numbering which is turned on most of the time but it's turned off when in insert mode or when the window losses focus (both when changing to another Vim window or when changing ...
2
votes
0answers
386 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,...
2
votes
0answers
648 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 ...
1
vote
0answers
35 views

Fold all methods in a Python class with Evil

How can I fold all the methods in a Python class? I use Evil and would prefer a pure Evil solution, if possible. I'm looking for a quick way to take something like this: class LongClassIDidNotWrite(...
1
vote
0answers
89 views

How to make Lisp state a default instead of normal?

I'm learning Clojure and Emacs at the same time 🤕 I use Spacemacs with Evil. Recently I've learned about Lisp state and I find it very handy. The only problem is that whenever I switch to insert ...
1
vote
0answers
31 views

How to avoid entering visual mode when clicking a link while using evil?

Emacs newbie here using spacemacs. How to avoid entering visual mode when clicking a link while using evil? This is particularly problematic in org-mode.
1
vote
0answers
20 views

Evil text object for innermost paired delimiter?

Q: how can I create a text object for innermost paired delimiters? evil has text objects to allow us to operate on the standard paired delimiters like parentheses, braces, brackets, quote marks, and ...
1
vote
0answers
33 views

Evil keybindings in reftex-toc

I would like to bind j to reftex-toc-next and k to reftex-toc-previous whilst in a reftex-toc buffer. According to the documentation, the keymap active in *toc* buffers is reftex-toc-map. I'm using ...
1
vote
0answers
112 views

org-cycle behaves differently for src blocks when evil-mode is enabled

I'm trying to indent my code in org src blocks, but it only works when evil-mode is disabled. I have set this variables for org-mode: (setq org-src-preserve-indentation t org-src-tab-acts-...
1
vote
0answers
28 views

Preserve Evil state when jumping between org-edit-special and org-mode

When executing C-' (org-edit-special) it always starts in normal evil state even if I am in insert state originally. Same when jumping back, if I am in normal state then it switches back to the ...
1
vote
0answers
289 views

How to automatically set default-directory to projectile-project-root?

emacs beginner here. I would like for the default-directory of any buffer that's part of a projectile project to be the project root. For example if I'm editing include/my_file.hpp and I do: :e src/...
1
vote
0answers
149 views

Evil paste behaviour

I'm noticing odd behaviour when I select some text with control-space and use p to paste -- in that the paste is done after the cursor character, rather than on the next line. Is that intentional, ...
1
vote
0answers
69 views

Evil mode dot key and numeric commands

I've been using Viper for countless years, and I'm trying to switch to Evil. One of the first things I noticed is that the dot 'do-again' key doesn't take any numeric arguments to the last command ...
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
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 ...
1
vote
0answers
41 views

How can I tell evil which language mode to use for indentation?

evil-indent does not work in ein, it simply collapses all indentations of the selected region. Can I somehow tell Evil that it is dealing with Python code?
1
vote
0answers
99 views

`M-f` doesn't move to next line in evil-mode

This happens on the Emacs splash page primarily. I can move back to the end of the previous line with M-b but cannot move onto the beginning of the next with M-f. As an experiment, I'm going through ...
1
vote
0answers
526 views

single escape to quit helm in terminal

This blog post on migrating from vim to evil-mode in emacs gives code to make a single ESC quit/cancel helm instead of 3. It worked on Emacs.app (OS X) but doesn't work from Terminal.app (both emacs ...
1
vote
0answers
426 views

Right aligned relative numbering with separator space in Spacemacs using linum-relative

I've been using Vim for a while and now I've discovered Spacemacs and I found it great how it blends Vim ease of editing with Emacs superior power. I really loved some parts of my Vim config, one of ...
1
vote
0answers
121 views

Evil mode - help with custom prefix key

I had a custom key that I used extensively in Emacs for custom editing actions: C-z. I decided to use evil mode (I came from vim originally so nothing too new) but I don't know how to rebind evil's C-...
1
vote
0answers
324 views

Redefine evil-ex-command

I use evil and evil-tabs with Emacs and am quite comfortable with my setup except a few times when I have multiple splits open in a tab, using :q ends up closing all the splits in the window. In Vim ...
1
vote
0answers
597 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 ...
1
vote
0answers
272 views

Start in insert state based on minor mode

I would like the org capture buffer (which IIUC is in org-capture-mode, a minor mode) to start in insert state; It seems that both the evil-insert-state-modes variable and the evil-set-initial-state ...
1
vote
0answers
308 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-...
1
vote
0answers
139 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 ...
0
votes
0answers
20 views

Apply vim macro to files in helm-ag result?

I am using spacemacs (using evil mode) and want to apply a vim macro (keyboard defined or otherwise) to the files resulting from a search in helm-ag. I'm thinking the easiest way would be to apply a ...
0
votes
0answers
10 views

Defining incomplete pairs with evil-surround

Using evil-surround, one can transform word to <em>word<\em> with ysiw<em>. I wonder if there is a general way of defining an incomplete pair (to be completed by em etc.), such that ...
0
votes
0answers
59 views

Define keybindings for org-agenda starting with SPC

Using emacs 25.2.2, general, evil and evil-collection from MELPA. I have the following in my init.el: (general-unbind 'org-agenda-mode-map "SPC") (general-create-definer my-leader :prefix "SPC")...
0
votes
0answers
76 views

org-mode + evil: insert heading, set cursor to line ending, and change to insert mode?

I am using spacemacs which contains org-mode and evil. Whenever I insert a heading (either org-insert-heading, org-insert-heading-after-current or org-insert-subheading), I have to do two extra ...
0
votes
0answers
220 views

Evil mode not working

Using emacs 25.2.2 on Kubuntu 18.04. Using list-packages I installed evil. Using customize-variable I added (evil-mode t) in my ~/.emacs.d/init.el file. But still when I restart emacs, there is no ...
0
votes
0answers
22 views

Enable Evil jump to work across all panes instead of only active pane

Is there a way to enable evil-jump-forward and evil-jump-backward to use the jump list of all panes instead of only the active pane? In the gif below, here's what happens: Start on left pane at ...
0
votes
0answers
41 views

How to convert a region into a Python function?

I'm using emacs with evil and anaconda mode for Python. Sometimes I'd like to convert a region or a block of selected lines into a def (or for/while loop, or class). Is there a way to do this ...
0
votes
0answers
27 views

How do I use the primary, not clipboard buffer?

Aka the equivalent of xclip -o -selection primary, not xclip -o -selection clipboard. primary is selection, clipboard is Ctrl-C usually.
0
votes
0answers
79 views

Fixing Evil inside Emacs terminal mode

I use Evil mode inside Emacs to emulate vim-style editing. In the Xwindows based graphical user interface of Emacs on Ubuntu 16.04, Evil mode works perfectly. When I launch emacs in terminal mode ...
0
votes
0answers
64 views

Re-map evil-commentary key in dired mode

I am trying to re-map a key in evil-mode/evil-commentary-mode when in dired-mode. I tried to add a hook to dired-mode to disable the minor commentary mode, but it disables it for other major modes as ...
0
votes
0answers
26 views

How do you remove the last few characters from all lines in a txt file in spacemacs?

How do you remove the last few characters from all lines in a text file? Example: 23193 123252 1 1238 123 1 34356363 11238080123 1 Should become: 23193 123252 1238 123 34356363 11238080123 I'm ...
0
votes
0answers
19 views

Evil surround repeat varying on varying width text possible?

I use viws" (visual select word surround with double quote) quite a lot then move up and hit . to repeat is there a way to modify dot so it does the exact command again. currently if i do the above ...
0
votes
0answers
222 views

Wanted: vim-like paste behavior from browse-kill-ring

When using the browse-kill-ring package to insert some text from the kill ring, the text always gets inserted before point. This is not intuitive to vim users who are used to pasted text being ...
0
votes
0answers
132 views

How can I disable the M-h keybinding in org-mode with evil-mode?

The problem seems to be that evil-mode translates the key chord M-<left> into M-h. Unsetting M-h by binding it to nil in the local, global or org-mode map in a org-mode hook does not help.
0
votes
0answers
75 views

How to change the command for comment toggling

spacemacs with Evil uses gcc to toggle whether a line is commented or not. I'd like to change it to ,cc. How should I go about this in my .spacemacs file?