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.

1
vote
1answer
12 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
6 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
20 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 ...
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 ...
0
votes
0answers
16 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 at vim. To reduce typing while using asni-term, I need to paste a yanked content directly via ...
0
votes
1answer
22 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
7 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
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
0answers
40 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
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 . ("{" . "}")) ...
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
1answer
62 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
42 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
1answer
88 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
23 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
23 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 ...
2
votes
0answers
25 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
69 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
33 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
36 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 ...
1
vote
1answer
39 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
66 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
30 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
44 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 ...
0
votes
2answers
37 views

How to change to evil-insert mode when there is no hook?

I'm trying to change evil-org to evil-insert-state when I add a note to my org files. I've tried to look it up, but can't figure it out. I've configured org-mode to always query me for a note after ...
0
votes
1answer
87 views

How can I get RET to follow org-mode links when using evil-mode?

In org-mode, the link-following behaviour of RET, that should be present when org-return-follows-link is set, doesn't work in evil-mode. MWE from emacs -q: Load an org buffer containing a link. Note ...
0
votes
1answer
234 views

How do I override a keybinding defined by evil-mode?

I've searched for this before but I've only seen questions like the below: https://stackoverflow.com/questions/683425/globally-override-key-binding-in-emacs How to override major mode bindings I don'...
1
vote
1answer
32 views

Making Emacs show the last part of bash-command output

I use the Evil mode inside Emacs for doing a lot of my work. If I need to run a shell-command and see its output all I need to do is type in normal mode :!<bash command>. The window splits into ...
0
votes
0answers
24 views

Apply vim macro to files in helm-ag result?

I am using spacemacs (using evil mode) and want to apply a vim macro (keyboard defined or otherwise) to the files resulting from a search in helm-ag. I'm thinking the easiest way would be to apply a ...
0
votes
1answer
30 views

How to enable bracket navigation in evil mode?

Vim mode has [ ] keys to navigate brackets. See this example. Eg, selecting a comment block can be done this way in vim: [/ v, % Is this possible in emacs with evil mode?
1
vote
2answers
1k views

How can I use multiple cursors in evil/spacemacs

There are multiple multiple-cursors implementations for emacs. I have the impression that extra work has been required to make them work well in evil and spacemacs in particular. I imagine the ...
1
vote
2answers
72 views

Prevent any form of ESC from closing a magit buffer

I'd like to be able to prevent Magit from closing a buffer when I press ESC. I also want to prevent my evil-escape-mode sequence (kj) from closing it as well. Running C-h k ESC gives <escape>...
1
vote
2answers
79 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(...
1
vote
1answer
79 views

Accidentally disabling evil mode in spacemacs

While use spacemacs in evil mode, I sometimes accidentally disable evil mode and I do not understand how I am doing it. And once disabled, I do not know how to reenable the mode without restarting ...
0
votes
1answer
120 views

Evil Mode, how to rebind the caps-lock key to go into normal mode

In addition to the Escape key, I would like to go into Normal mode while editing by pressing the caps-lock key. How do I achieve that? Thus far I have been able to disable the Caps-lock key using ...
0
votes
1answer
35 views

Case insensitive find character in `evil` and `evil-easymotion`

I wonder whether it is possible to make f in evil and/or in evil-easymotion case insensitive?
0
votes
1answer
71 views

Cannot open remote file

I am trying to open a remote file in spacemacs in evil mode on windows using SPC f f. This pops up helm and entering /ssh:myuser@myhost/folder/file.txt produces Wrong type argument: stringp, nil In ...
0
votes
2answers
135 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 ...
0
votes
0answers
10 views

Defining incomplete pairs with evil-surround

Using evil-surround, one can transform word to <em>word<\em> with ysiw<em>. I wonder if there is a general way of defining an incomplete pair (to be completed by em etc.), such that ...
0
votes
1answer
581 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 ...
2
votes
1answer
76 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
1answer
132 views

Setting C-p as helm-projectile-find-file

I put this at the very end of my config file: (global-set-key (kbd "C-p") 'helm-projectile-find-file) On Emacs start I can see that it is getting assigned using C-h k C-p. Then when I actually load ...
1
vote
0answers
115 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 ...
4
votes
2answers
126 views

Help! Emacs empty my 1 year org file

I have used Emacs Org mode for my notes for several years, and I use Prelude configured with evil. Everything works fine. Until a few minutes ago, I found the note file is empty of content. and the ...
3
votes
1answer
63 views

Assign TAB in markdown mode

Running emacs 25.2.2, general, evil and markdown-mode installed from MELPA. The problem is when I hit TAB on a heading in a markdown file, it does not cycle visibility of content. C-h k TAB shows it ...
0
votes
2answers
262 views

How to unhighlight after searching in evil mode?

I have a text file opened in Spacemacs with evil mode on. When I search for a term by means of /term [Enter] then found "term"s are highlighed. How do I remove that highlighting? I tried / [Enter] - ...
0
votes
0answers
68 views

Define keybindings for org-agenda starting with SPC

Using emacs 25.2.2, general, evil and evil-collection from MELPA. I have the following in my init.el: (general-unbind 'org-agenda-mode-map "SPC") (general-create-definer my-leader :prefix "SPC")...
0
votes
1answer
76 views

C-x and M-x remapped to SPC and SPC-SPC

What would be the best way to configure Emacs to handle the above keybindings for vanilla Emacs? Specifically, I'd like to have SPC work as C-x and SPC SPC work as M-x. I love Spacemacs for the ...