Questions tagged [evil]
Evil Mode is a Vim emulation layer for Emacs.
111
questions with no upvoted or accepted answers
5
votes
1answer
801 views
Use hydra with evil motions
I'm trying to use a hydra to dispatch among a selection of motions. See this minimal example:
(defhydra hydra/test (:color blue)
"This is a test hydra"
("n" evil-next-line))
(evil-define-motion ...
4
votes
3answers
971 views
Jump to location in org-mode while properly unfolding headings
I'd like to find a way to jump to a location in an org-mode file while automatically unfolding only the heading at the location I'm jumping to and all its parent headings (but not any sibling headings)...
3
votes
0answers
43 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 ...
3
votes
0answers
50 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
133 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
1answer
166 views
change evil operators to be non-greedy
I notice that some of the evil around operators are greedy. As in they grab space around the surrounding delimiters. One such operator is the a".
Assuming that my cursor is | when I use va" the ...
3
votes
0answers
532 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
640 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 ...
3
votes
0answers
268 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?
3
votes
0answers
467 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 ...
3
votes
0answers
588 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
13 views
Evil text objects on kebab-case behave differently on dw and cw
I would like my evil text objects to work on kebab-case words, so that dw or cw act on the "whole-kebab-word" and not just on "whole".
Therefor I have put (modify-syntax-entry ?- "w" clojure-mode-...
2
votes
0answers
114 views
How can I use evil-mc in spacemacs?
This question is a semantically similar question but the OP's intent was more about which implementation of multiple cursors was "best".
I echo one of the commenters of that question who asked "Can ...
2
votes
1answer
96 views
How can I make terms searched with `*` or `#` populate the search history?
In my attempt to have * and # work in Spacemacs as they do in Vim, I've followed the solution posted at this question.
Those keys now work, but there's one hurdle more to overcome: the searched term ...
2
votes
0answers
245 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 ...
2
votes
0answers
63 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 ...
2
votes
0answers
462 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
103 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
1answer
191 views
Generate dynamic keybindings depending on keyboard layout
This is a bit of an esoteric request so I will try to phrase it clearly.
I am currently beginning to learn colemak and doing so through a series of transitional layouts that go by the group name of ...
2
votes
0answers
237 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
421 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
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 ...
1
vote
0answers
16 views
How to get the “number prefix” to be used in a function? (evil mode)
With emacs evil-mode, you can use number prefixes before commands (like in vim). For example 10j goes 10 lines down. I am trying to define a custom function which can make use of these "number ...
1
vote
0answers
65 views
Rebind a key in insert mode for a major mode?
I'm trying to rebind a key in insert mode for a major mode and I just can't seem to get it - I have in my .spacemacs
(evil-define-key '(normal insert) rjsx-mode-map
(kbd "C-d") 'rjsx-delete-...
1
vote
0answers
48 views
scroll-preserve-screen-position screws up evil-scroll-down (C-d) in evil
centered-cursor-mode has been extremely sluggish so I found that this setup achieves the same without the slowness:
(setq scroll-preserve-screen-position t
scroll-conservatively 0
maximum-...
1
vote
0answers
29 views
Evil commands reset margin
I'm using evil-mode and olivetti-mode, which adjusts the margins so that the text is centered in the window. My screen usually looks like this:
Voluptatem tempore unde eveniet cumque ...
1
vote
0answers
25 views
Add recent files to .viminfo
Is there a package or code snippet that can make Emacs add recent files to .viminfo? I want this to use with v. (Basically to open recent files using fzf)
Iām using Spacemacs (so evil, too), if that ...
1
vote
0answers
60 views
How to navigate SPC commands with Vim cursor?
I am very used to Vim keys BUT I love to use Emacs. That's why Spacemacs in Evil mode is perfect for me. There is one thing I still cannot figure out how to do. I don't know how to use h,j,k,l for ...
1
vote
0answers
31 views
Evil substitue with a counter
I was wondering if it is possible to run a substitue command in evil with a counter? For example, with query-replace-regexp you can use replace-count: (format "word-%d" (1+ replace-count)).
1
vote
1answer
345 views
spacemacs - rebind existing keys
I am trying to rebind j, k key as well as capital E, B and Y, but cannot get them to work. Any pointers?
I put this into my .spacemacs (in dotspacemacs/user-config):
(evil-define-key 'normal key-...
1
vote
0answers
13 views
Keeping that evil cursor from running off
In Evil, as in Vim, combining an operation with a movement moves the cursor to the beginning of the text operated on. For example, if I'm in the middle of a line and type gU^, then everything from ...
1
vote
1answer
279 views
Prevent mouse click from changing cursor position while in insert mode
I work on a laptop most of the time and it happens somewhat often that while inserting some text (in evil mode) I will accidentally hit the touchpad with my thumb, changing the cursor position and ...
1
vote
0answers
60 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
38 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
131 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 ...
1
vote
0answers
213 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
41 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
441 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
269 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.
1
vote
0answers
389 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
126 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
61 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
185 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
1answer
143 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
676 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
465 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
151 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
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 ...
1
vote
1answer
356 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 ...