Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [evil]

Evil Mode is a Vim emulation layer for Emacs.

Filter by
Sorted by
Tagged with
0
votes
1answer
23 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
12 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
23 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 ...
2
votes
1answer
513 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
45 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
28 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
37 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
9 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
53 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
26 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
61 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
82 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
22 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
30 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
15 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
28 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
36 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
33 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
27 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
30 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
44 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
46 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
18 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
22 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
81 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
0answers
48 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
36 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
74 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
24 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
30 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
225 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
86 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
190 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
129 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 ...
0
votes
1answer
139 views

Issue binding space as leader with evil-mode and general mode

I am currently trying to set up my config so that I can use evil-mode while also using the space key as a local leader for some command while mapping my keys with general.el package. ;; hide tool bar ...
3
votes
0answers
31 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 ...
1
vote
1answer
75 views

Interactive lambda only calls 1 of several functions called in body

In term-mode I've configured the keybindings for term-line-mode and term-char-mode as follows: (setq term-bind-key-alist (list (cons "C-c C-j" '(lambda () (interactive) ...
0
votes
1answer
78 views

evil-mode unwanted abbrev expand (setq evil-want-abbrev-expand-on-insert-exit nil)

Upon escaping evil-insert-state, if the cursor is next to a letter/phrase in my abbrev list, it expands despite having (setq evil-want-abbrev-expand-on-insert-exit nil) called before evil-mode. ...
0
votes
1answer
52 views

Why does Evil autocomplete simpl. ESC to beta delta [] iota zeta.?

This might be a strange question but every time I type: simpl. <ESC> Evil substitutes it with: simpl beta delta [] iota zeta. this is driving me nuts. Why is this happening and more ...
3
votes
0answers
45 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 ...
0
votes
5answers
47 views

How to define action to happen on triple key press?

I'm using evil mode. I'm looking for a convenient way to type German language Umlaut characters (ä, ü, ö, Ä, Ü, Ö, ß) while using an English US keyboard layout. One idea that came to mind was to ...
1
vote
1answer
52 views

How does one save and close a file in Proof General without all of Evil shutting down?

I am using evil (emacs+vim). I am also using Proof General for the theorem prover Coq. I was trying to work with emacs but whenever I do: :x or :q in my coq .v file all of emacs closes as well (...
2
votes
1answer
102 views

When using `lisp-state`, how can we repeat an action like slurp, and bind a key to easily perform the repeat?

In vim, I frequently used the "." shortcut for repeating the last command. I found this extremely useful especially when working with clojure tools to do things like slurp-ing and barf-ing to refactor ...
0
votes
1answer
42 views

evil mode j and k moves between paragraphs instead of lines on markdown and text modes

evil mode j and k in markdown and text modes moves down paragraphs (and sometimes to other arbitrary points down/up the paragraph) instead of up and down a single line. How can I change this behaviour?...
1
vote
1answer
76 views

Emulate vim modeline in evil mode

As a background, vim modelines is a magic comment in the text file that sets some of the vim options. It is similar to emacs' file variables. A modeline like ;; vim: set expandtab : in a lisp file ...