Questions tagged [evil]

Evil Mode is a Vim emulation layer for Emacs.

Filter by
Sorted by
Tagged with
0
votes
0answers
533 views

I broke Spacemacs

After editing my .spacemacs file, spacemacs is saying that there is an unmatched parenthesis and I need to go into startup recovery mode. After looking at the file, I have not found any problems. ...
1
vote
0answers
21 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 ...
0
votes
0answers
41 views

Evil and adding a binding for evil-ex-define-cmd globally for tabbar mode

I’m using spacemacs: •  How can I (globally —ie, permanently) bind a new command :tabe to open a new tab in the emacs built-in minor mode TabBar? •  Right now, :tabnew works. But I want to make :tabe ...
0
votes
1answer
35 views

Spacemacs, Lisp, Pasting and the missing Space

When editing Lisp or Clojure in Spacemacs (Emacs with Evil) I find the pasting behavior anoying. Say I have yanked bar and want to paste it as a parameter to (foo) so I get (foo bar). The problem is, ...
0
votes
1answer
67 views

How to remap the search backwards evil-ex-search-previous command of evil?

I want to remap evil-ex-search-previous to some other key than ,. I tried (define-key evil-motion-state-map "," 'evil-avy-goto-char-in-line) (evil-define-key 'normal magit-mode-map ",&...
0
votes
0answers
113 views

Disable evil-mode in eshell

I have disabled evil-mode in eshell by (evil-set-initial-state 'eshell-mode 'emacs) but when I switch windows(accidentally) using C-w k from eshell, evil-mode gets enabled. How do I prevent this ...
0
votes
1answer
40 views

Hardline Wrap and Emacs Keybinding

The terminal interface to Emacs is marvelous and I like how it handles parentheses. I have two questions as I'm trying to move to Emacs as both a writing and coding environment. I installed a minimal ...
0
votes
1answer
72 views

Disable Evil-mode's state indication on mode line

How do I disable evil-mode's state indicator on the mode line? I don't want to see anything like <N>, <I>, <V> on my modeline.
0
votes
0answers
43 views

How can I remove clipboard from being the default register?

I'm using emacs with evil keybindings (specifically spacemacs). The default behavior of the paste command p is to paste in the clipboard, and default behavior of the delete command d is to put the ...
0
votes
0answers
113 views

How to trigger a hydra when entering evil-mode normal state?

I have the following: (use-package evil :hook (after-init . evil-mode) (evil-normal-state-entry . hydra-evil/body)) When leaving the emacs state (with C-z) and entering normal state, all my ...
0
votes
0answers
25 views

execute a function when emacsclient opens a frame

I am using emacs-evil and when I open a new frame on X11 I can normally use ESC key switch between writing and command mode. But in terminal it won't work, and it just trigers meta. I have been able ...
0
votes
1answer
80 views

create new keybinding for command mode in evil mode

I am using doom emacs and would like to create a keybinding to run the following line so that I don't need to write it every time I want to run a block of code of python :w !python The above line ...
0
votes
1answer
61 views

Archive all marked entries with evil-mode

I recently switched to evil mode and cannot figure out how to archive all marked entries at once. The way I did it earlier, when I was in a list seeing the candidate entries for archiving I pressed * ...
1
vote
1answer
314 views

Remapping the `g` prefix key for all modes (Evil, org and outline minor mode), assigning a single function to `g`

The question is quite intricate. I am using doom-emacs and evil and I am customizing the keys. Usually, something like (define-key evil-normal-state-map "g" 'evil-paste-after) would work. ...
1
vote
1answer
106 views

Change C-z from Minimise to Toggle Evil Mode

I am a fairly new emacs user and would appreciate any help you could offer. I have recently installed the evil mode package onto my emacs. The package itself works perfectly, however, the default ...
0
votes
1answer
20 views

Can behavior of `W` be changed by modifying syntax entries?

I want dW and dB to not delete brackets in racket (all 3 kinds [, (, {). I'm looking at changing W and not w because w is still useful for changing parts of an identifier, e.g. I can easily change ...
1
vote
1answer
75 views

Skip over remaining errors in current file to next error in next file

tl;dr I am using :cn in Evil's Ex command line and would like to use :cnf as well, but it is not there, and I don't know what function to bind it to. Details As a former Vim user who is slowly ...
0
votes
1answer
39 views

Emacs keeps overwriting files in Haskell mode

I'm using emacs: GNU Emacs 26.3 Copyright (C) 2019 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the terms of the GNU ...
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-...
0
votes
0answers
74 views

Replace normal state keymap in Evil with another

I don't like Evil collections or the Evil keybindings in the dired-mode. I would like to re-map only few keys in the normal state like j, k, and a few more keys with g prefix and I would like to keep ...
0
votes
1answer
58 views

Expiring search highlights in Evil

I'm using the evil-search module ((evil-select-search-module 'evil-search-module 'evil-search)). When I perform a search, the results remain highlighted until I call evil-ex-nohighlight. I'd prefer ...
2
votes
1answer
203 views

What is evil-mode's equivalent to vim insert-mode completion?

I'm making the move from Vim to Emacs + Evil-mode. I miss Vim's CTRL-X in insert mode to trigger completion of either words, tags, file paths, etc. I wonder if evil-mode has something similar? ...
0
votes
1answer
130 views

How do I set evil mode to use the normal state by default in Customize mode?

When I open the Easy Customization in Emacs, I want to be in normal mode instead of emacs mode. Is that possible?
1
vote
3answers
350 views

Evil mode send escape before Alt/Meta-command

In vim one can escape normal mode by pressing Alt or Meta then pretty much any key, e.g. Met-j to escape insert mode and move down a line. Holding alt before typing would send an <Esc> key ...
1
vote
1answer
290 views

Emacs + visual line numbers + folding + visual fill column mode

Relative line numbers for me it's a little bit painful topic. I'm using evil (spacemacs) and I want to jump between lines by in vim style like 10j, 4k etc. Is it possible to get line numbers behavior ...
0
votes
1answer
223 views

Run current line or selection in shell then insert result in Emacs buffer (Acme workflow)

Given lines like these: pwd echo "Hello \ World" in a buffer, I would like to do the following: Put the cursor to the first line, then press C-` Select lines 3-4 then press C-` to send the line ...
1
vote
2answers
171 views

Spacemacs evil-mode : How to toggle off visual mode in interactive function call?

;; .spacemacs file (defun my/function (beg end) ;; To work with visual selection: (interactive "r") ;; Displays visual selection in message buffer: (message (buffer-substring-no-...
0
votes
0answers
52 views

Underline error

When booting emacs, I get this strange error: See https://github.com/emacs-evil/evil-collection/issues/60 for more details. Warning (initialization): An error occurred while loading ‘/Users/...
0
votes
1answer
43 views

Completing underscored words without making _ a word character

I would like to use evil-complete-previous (or whatever) to complete strings_such_as_this, which is by default not possible. It is possible after (modify-syntax-entry ?_ "w"), but this has the ...
1
vote
0answers
73 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
54 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-...
0
votes
0answers
144 views

Wrong type argument: arrayp, nil in X mode

I'm getting a strange error on Emacs 27. Only in GUI mode (not in terminal mode), typing / to open the Evil search functionality results in the error wrong type argument: arrayp, nil being displayed ...
0
votes
1answer
65 views

Using evil and org-mode, as my file size grows, there is increasing delay in any command that changes text

There is only delay when changing text: navigation all works instantly, as normal. The delay has gotten to about one full second now, it's getting pretty bad. The file is around 15,000 lines long, ...
0
votes
1answer
257 views

Is there a way to write and kill a buffer in a single command in Spacemacs / Evil?

I am new to (Spac)Emacs with Evil, and I did quite some searching to find an answer to this question, so I hope this is a 'legitimate' question here. Is there a default single command to write a ...
0
votes
1answer
103 views

Why isn't the Evil global motion map used in Info mode?

I'm having a problem where it appears Emacs is not looking at keybindings set in my evil-motion-state-map. Below is my entire init.el. I start with an empty .emacs.d directory and only install evil. ...
1
vote
1answer
263 views

Evil key bindings with evil-define-key do opposite of what I want?

Below is the entirety of my Evil key bindings in init.el: (evil-define-key 'normal 'global (kbd "SPC") (make-sparse-keymap)) (evil-define-key 'normal 'global (kbd "SPC TAB") #'ivy-switch-buffer) (...
0
votes
0answers
209 views

What does evil-define-key do?

evil-define-key's docs say it "create[s] a STATE binding from KEY to DEF for KEYMAP." What is a "state"? What is a "state binding"? Emacs doesn't have "states" as far as I know? My current ...
3
votes
1answer
1k views

How do you type a space character in Spacemacs?

I was researching editors and I ended up stumbling upon Spacemacs and the fact that it uses the spacebar instead of traditional modifier keys. The documentation claims that this lowers the user's risk ...
5
votes
1answer
3k views

How to disable evil-mode everywhere?

I have recently installed emacs doom, and I tried to customise it with some custom keybindings. I have found that Evil is just not something I want. I can disable it on a per-buffer basis with M-x ...
2
votes
2answers
140 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 ...
0
votes
0answers
206 views

Why is scrolling line-by-line so much slower compared to vi-mode?

I was wondering if anyone has faced this issue before or is just me loosing my mind? It seems that C-n and C-p are so slow and sluggish compared to the j and k keys when using evil-mode. Is there any ...
0
votes
1answer
252 views

evil star & visualstar without moving the cursor

Is it possible to do something similar to these vim commands with emacs-evil? They basically do the same thing as * and visualstar of vim (and evil) but they do not move the cursor to the next match. ...
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 ...
0
votes
1answer
120 views

Remap Company's select next and select previous keys, with evil-mode?

When company-mode pops up suggestions, I want to use C-n and C-p to select the next or the previous options, instead of M-n and M-p. Having found the general answer on this site, I was happy to try ...
1
vote
0answers
26 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 ...
3
votes
1answer
294 views

Evil Surround - Symbol's value as variable is void

When I execute cs<old-text-object><new-text-object> (i.e. any cs or ds action) I get the following error. Anyone know how to resolve this or at least suggestions on debugging it? evil-...
1
vote
0answers
70 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
32 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
176 views

Evil: How to add keybinding for changing buffers?

With Evil mode, :bn shows the next buffer, and :bp shows the previous buffer. I wish to define a custom keybinding where <Space>n shows the next buffer, and <Space>p shows the previous ...
0
votes
1answer
348 views

Saving file everytime leaving insert mode in evil-mode

Is there a way that I can automatically save the file when leaving insert state to go to normal state with ESC?

1
2
3 4 5
10