Questions tagged [evil]

Evil Mode is a Vim emulation layer for Emacs.

Filter by
Sorted by
Tagged with
0
votes
1answer
17 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 ...
0
votes
0answers
6 views

Bug: evil mode delete with a mouse click mispositions cursor location

when using evil mode, pressing 'd' in normal mode and then clicking a position deletes what ever is in between the current cursor location and the clicked position. The issue I noticed was that when ...
0
votes
0answers
19 views

Unsure on how to set Evil keybinds

In order to install evil and evil-collections I added this to my config: (use-package evil :ensure t :init (setq evil-want-keybinding nil) :config (evil-mode 1)) (use-package evil-...
0
votes
0answers
9 views

How to setup spelling for same words in different languages?

I'm becoming a Vim expat. One of the things I need on my setup is to be able to get spell checking for two languages: English and Portuguese. What's particular about the way I setup this in vim is ...
1
vote
0answers
24 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-...
0
votes
0answers
13 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
18 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
0answers
11 views

How to replace all search-highlighted text resulting from a search with evil mode?

Once there is a search result, either from... Pressing / and entering the search term. Pressing * over a word. How can I replace the highlighted text after performing a search? Currently I ...
0
votes
1answer
33 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
49 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
0answers
19 views

Smooth scrolling with Evil + C-d/C-u/C-f/C-b

There are several smooth scrolling plugins for vim, but with Emacs Evil mode I haven't found any way to get similar behavior. smooth-scrolling-mode doesn't seem to do anything.
0
votes
1answer
31 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. ...
0
votes
1answer
52 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
44 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
567 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 ...
0
votes
1answer
137 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 ...
0
votes
0answers
47 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
39 views

recover org file

I use emacs org mode + EVIL on MacOS. I had a small part of my file visually selected last night when I wrote :wq and hit y to the prompt. To my shock and horror this morning only the visually ...
0
votes
0answers
12 views

Add advising function to evil-ex

I want to add a display-line-number-mode advice to evil-ex. This should turn on line-numbers when I toggle evil-ex in a non line-numbered buffer. (defvar line-number-changed-call nil) (defun ...
0
votes
0answers
57 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
0answers
40 views

Record a keyboard macro in Evil Mode to a register with another keyboard macro inside it

In vim, one can type qw to start recording a macro to register w, then record the macro, then finish recording to w by pressing q again. It is then possible to record another macro by typing qe, ...
0
votes
0answers
65 views

profiler not showing some function calls?

I open a buffer and start a profiling session with profiler-start, selecting cpu. Then, repeatedly invoke evil-scroll-up and -down with C-u and C-d, perhaps 10 times each. The profiler-report output, ...
0
votes
1answer
98 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
25 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
39 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
18 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 ...
0
votes
0answers
30 views

Using `evil` and `evil-paredit` with visual selection and deletion

I have trouble making paredit work together with evil. I can either turn of evil-paredit and then don't have paredit work correctly as commands like x and dd will mess up the matching parenthesis. If ...
2
votes
1answer
68 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
37 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
28 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)).
0
votes
0answers
17 views

Evil horisontal scroll key efficiency

Is it possible to make zl work as zlllll... (also zh) as many times as you need? What I do now is zl C-x z zzzz.... The hydra package seems to do that but I will have to re-map all keys starting with ...
0
votes
0answers
32 views

Synchronised scrolling in Evil mode

Is it possible to do synchronized scrolling of two windows in Evil mode, similar to what :set scrollbind does in Vim? sroll-all-mode doesn't quite achieve this. For example, it doesn't scroll on G or ...
1
vote
1answer
54 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
77 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?
0
votes
1answer
71 views

describe-key for sequence mappings such as those in evil-mode

So, in evil mode, something like d i b (delete inside brackets) is a common occurence. However, describe-key will immediately describe just the d part. Using (describe-key "d i b") produces: d i b is ...
1
vote
1answer
31 views

A global version of evil C-w

In vim and evil mode, normal-state C-w prefixes various window-related commands. For example, C-w l moves focus to the right, and C-w L moves the currently focused window to the right. I would like ...
1
vote
1answer
116 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-...
0
votes
1answer
67 views

Rebinding smartparens keys using Evil

I use vanilla Emacs with evil. I did not install smartparens but it is present and enabled on my system as a dependency of something. I need to rebind the M-s keys to something other than the default ...
1
vote
0answers
12 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 ...
0
votes
0answers
30 views

How to paste from clipboard/yanked text into the ansi-term in evil mode?

I'm macos user and quite new to emacs and going to set up my workflow pretty similar to what I have in vim. To reduce typing while using asni-term, I need to paste a yanked content directly via ...
0
votes
1answer
44 views

Evil, How do I display visual range in mode-line

I'd like to see the size (number of rows and/or columns) of the visual selection in my mode-line. I use evil. How do I do that?
0
votes
0answers
15 views

Changing the input method during evil search

When, in evil normal state, I have pressed / to perform a search and the echo area shows /, can I change the input method; if so, how?
0
votes
0answers
23 views

Creating aliases for key sequences

I found that I can, in evil normal-state, use <leader> c as an abbreviation for (or rather alternative to) C-c: (evil-leader/set-key "c" (lambda () (interactive) (setq unread-command-...
0
votes
0answers
93 views

Evil-mode mixed tabs & spaces indentation

I'm having extreme issues at the moment with evil mode where I am working on Jade/Pug and Stylus files for Node.JS where it is white space sensitive. I installed pug-mode but when you indent via >> ...
0
votes
0answers
34 views

evil-embrace: remove default mappings

I use evil-embrace together with evil-surround and remapped the evil-surround keys with: (setq-default evil-surround-pairs-alist '((?b . ("(" . ")")) (?c . ("{" . "}")) ...
1
vote
1answer
32 views

Keep text selection after indenting with evil

I'm using emacs with evil key-bindings and I like to know, after getting some text into visual mode, how do you make sure that after hitting >> for indenting the text, the selection is kept, ...
0
votes
1answer
277 views

OS copy/paste not working for emacs-mac

GNU Emacs 26.1 (build 1, x86_64-apple-darwin16.7.0, Carbon Version 157 AppKit 1504.83) of 2019-01-27 I just recently installed the emacs-mac port of GNU Emacs 26, and the OS copy/paste functionality ...
0
votes
1answer
120 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 ...
0
votes
1answer
288 views

Emacs evil-mode C-c/C-x to “cc”/“cx”. ( key translation)

I read in evil wiki that I can change prefix keys such as C-c or C-x and so on to cc, cx, but I'm not experienced in Elisp and I tried a lot of variants but I can only define c as C-c but not a cc to ...
0
votes
2answers
151 views

How to change line COUNT for for evil-scroll-up

How to change line COUNT with C-u or C-d for evil-scroll-up or evil-scroll-down? From Spacemacs help: C-u (evil-scroll-up COUNT) C-d (evil-scroll-down COUNT) If COUNT is not specified the function ...