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.

3
votes
0answers
12 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
78 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
188 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
435 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
179 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
140 views

Interactive lambda functions

How do I create interactive lambda functions? (use-package general :ensure t :config (general-evil-setup t) ;;(setq general-default-keymaps 'evil-normal-state-map) (general-define-key :...
2
votes
0answers
271 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
67 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
168 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
192 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
395 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
376 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
630 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
27 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
69 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
27 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
18 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
30 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
92 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
27 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
62 views

Strange behaviour on evil-delete

When I use Emacs with Evil mode for some time, I sometimes get to a point, where I have no choice to what I want to delete when pressing d (or calling evil-delete). The current line gets deleted ...
1
vote
0answers
262 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
130 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
67 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
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
0answers
91 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
94 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
510 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
421 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
118 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
309 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
582 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
266 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
306 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
137 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
13 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
7 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
14 views

Surrounding a word at point with `evil-surround`

Using evil-surround, how could one craft a function to surround the full word at point with \(..\)? One might start by adding the bind i (which stands for "inline" or "latex inline math mode") to ...
0
votes
0answers
53 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
46 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
157 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
20 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
39 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
25 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
47 views

Mark ring in evil

In evil, you can use C-i and C-o to move forward and backward to the recent visited place. If I did many mark action, and want to loop from each of them, how do it effectively in evil?
0
votes
0answers
64 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
56 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
39 views

Using advice-add messes up syntax highlighting

I have the following (stripped down) code in my .emacs: (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) (package-initialize) (let ((default-directory (...
0
votes
0answers
25 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 ...