Stack Exchange Network

Stack Exchange network consists of 175 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.

0
votes
0answers
13 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 ...
0
votes
1answer
22 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
15 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
2answers
125 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
22 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
26 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
1answer
10 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
15 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 ...
0
votes
0answers
17 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
1answer
119 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 ...
0
votes
0answers
24 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 ...
2
votes
1answer
160 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 ...
0
votes
2answers
148 views

how to define an evil-operator to move forward/backward a text-object?

I am trying to define a function that moves to the begin/end of current text-object. First - I define an operator: (evil-define-operator evil-forward-text-object (beg end type) "move to end of ...
4
votes
1answer
592 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 ...
0
votes
1answer
88 views

Evil Org-Mode set L and H to tabbar movements

I can toggle org-mode TODO status with L and H when the pointer rests at a org heading. I wish I could bind those keys to tabbar-"movements" to mimic the behaviour I get in all othem mode with this ...
0
votes
1answer
20 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
0answers
11 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 ...
3
votes
1answer
614 views

Pasting without auto-indent

Whenever I paste something in a source code buffer it is automatically re-indented. This is great sometimes, if I'm pasting a complete block of code or a single self contained line for example, but it'...
3
votes
3answers
406 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)...
0
votes
1answer
123 views

How to insert/dump all keyboard macros at once?

Is there a way to show all keyboard macros (similar to insert-kbd-macro) without having to first name each macro? Using macros with evil-mode in case this makes a difference.
0
votes
2answers
162 views

Disabling reusage of evil scroll count

If evil-scroll-line-down is not given a count argument, the last count is used. This is not the behaviour of vim, which scrolls one line if no count is specified. How can I get vim behaviour?
0
votes
0answers
8 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?
1
vote
2answers
91 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(...
0
votes
1answer
45 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
0answers
17 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
1answer
28 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 ...
0
votes
0answers
45 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 >> ...
3
votes
1answer
100 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 ...
0
votes
1answer
727 views

Changing mode-line face when evil state changes

I'm trying to change the mode-line face box attribute to be the same color as the evil emacs state face, obviously updating it each time the mode changes. I've seen some things about using a post-...
0
votes
1answer
223 views

add-hook evil-insert-state-entry-hook is not calling the function

Update: It worked properly somehow after disabling and enabling nyan-mode. BUT there is no evidence indicating any relationship between them. Because I can't reproduce this problem after it was ...
3
votes
2answers
318 views

Evil and org-mode keybinding 't' conflict

In Spacemacs with evil and org-mode, the letter 't' is assigned to two functions: org-todo (don't need this because I use shift-arrow to cycle through todo states) evil-find-char-to (I need this) ...
0
votes
1answer
597 views

Emacs not loading .emacs file

First time emacs user trying to install "evil mode". I'm attempting to follow the instructions at https://blog.aaronbieber.com/2015/05/24/from-vim-to-emacs-in-fourteen-days.html. I installed emacs on ...
0
votes
0answers
15 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 . ("{" . "}")) ...
2
votes
1answer
77 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 ...
12
votes
2answers
2k views

How do I jump out of enclosing parentheses?

I'm using spacemacs to edit Python code. When I type an opening parentheses, the closing parentheses is automatically inserted for me and the cursor is put in the middle for further typing. But: ...
0
votes
1answer
74 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 ...
1
vote
1answer
99 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
28 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 ...
2
votes
0answers
26 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
73 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) ...
4
votes
1answer
655 views

Evil package/alternative for motion through CamelCase words?

Most programming languages use CamelCase ("anIdentifier") naming conventions for identifiers. With Evil, you could navigate inside those identifiers using Evil built-in motions is the [count]f{char}...
0
votes
1answer
36 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
37 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
41 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
42 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 ...
2
votes
1answer
71 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 ...
5
votes
3answers
491 views

Have Ctrl-a increase a number just like in vim

In spacemacs Ctrl-a is being used to move to the beginning of the line. I'm more used to 0 to move to the beginning of the line and $ to the end, which works in spacemacs. Ctrl-a increases numbers in ...
1
vote
1answer
40 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 (...
0
votes
1answer
33 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
2answers
89 views

How to make C-g cancel evil-replace rather than typing ^G?

In evil mode, the r command, evil-replace, waits for a replacement character to be typed and replaces the current character with it. Sometimes I hit r by mistake and wish to cancel, so I hit C-g. ...