Questions tagged [evil]

Evil Mode is a Vim emulation layer for Emacs.

Filter by
Sorted by
Tagged with
38
votes
7answers
9k views

How to treat underscore as part of the word?

I use Emacs + evil mode. When I position the cursor on e (in normal state) in a chunk of text such as abc_def_ghi, ciw (change inner word) changes only the def part of the string, while Vim would ...
20
votes
1answer
4k views

evil-mode visual selection copies text to clipboard automatically

Setup: GUI version GNU Emacs 25.0.50.1 (x86_64-w64-mingw32) of 2015-07-25 on KAEL Compiled from EmacsW64. Package Evil, using the latest version of Evil from MELPA Windows 7 x64 bit. Situation: ...
19
votes
2answers
3k views

How can I get undo behavior in Evil similar to Vim's?

The default undo behavior in Evil is too coarse-grained because it considers anything taking place between entering insert mode and leaving it as one edit operation. When you enter a whole paragraph ...
16
votes
2answers
3k views

How do I turn off Spacemacs’s tildes on empty lines?

I just installed Spacemacs, mainly for its nifty defaults. One default I'm not so pleased about is that it puts tildes on empty lines in the file. I've tried putting (setq vi-tilde-fringe nil) and (...
14
votes
1answer
10k views

Instructions on how to work with Evil Mode

I am considering in giving Evil Mode a chance. I have searched extensively to find how do you use it and everyone is just sharing their customizations. What I can't understand is when you install and ...
13
votes
3answers
3k views

Is there an equivalent to sed-style substitution commands from vim?

One of the things I miss from vim is being able to type in a substitution command that will work over multiple lines, for example: :/begin/,/end/s/foo/bar/g The above command substitutes "foo" for "...
13
votes
7answers
5k views

Evil: map keybindings the vim way?

I am trying to make the Evil function evil-jump-to-tag, C-] behave like the Emacs binding M-.. The normal behaviour is fine for browsing Tags files, but I want it to work also for Slime's slime-edit-...
13
votes
1answer
3k views

Differences between evil-normal-state-map and evil-motion-state-map

Documentation for evil-normal-state-map: Keymap for Normal state. Documentation for evil-motion-state-map: Keymap for Motion state. Does Vim have a so-called "motion mode"? In Vim, executing :...
12
votes
2answers
3k 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: ...
12
votes
3answers
3k views

Possible not to use undo-tree in evil mode?

Every so often I run into bugs in undo-tree, where I can't redo, with the following known bug, another report & reddit thread. primitive-undo: Unrecognized entry in undo list undo-tree-canary ...
11
votes
2answers
6k views

hybrid line number mode in emacs?

Is it possible to show the absolute number of the current line, instead of "0", when in relative line number mode? This is sometimes referred to as "hybrid line number mode". Like this: 7 ...
11
votes
1answer
3k views

Evil mode and regular expressions

In Vim, if I want search for all variable names LX where X is a number, I can simply type /L\d. However, this doesn't seem to work with evil. Is there another syntax for regular expressions in Evil ...
10
votes
2answers
926 views

Default Magit commit state in Evil

I use evil. Normally, when I commit, I'd like to immediately start typing, but evil starts the buffer in evil-normal-state. I used to set (evil-set-initial-state #'git-commit-mode 'insert) But that ...
10
votes
1answer
4k views

Evil cursor change by state

Until today, when I was in the normal state in evil, the cursor was a block, and it would switch to an I-beam when in insert state. Something changed, however, and the cursor is now always the I-beam....
10
votes
2answers
988 views

How to Persist Evil Markers?

I want to be able to save my buffer local evil markers (m to mark a location and then ' or ` to jump to it) across emacs sessions/instances. I'm not really sure how to do this. I tried installing/...
9
votes
4answers
2k 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 ...
9
votes
1answer
3k views

How do I set up key bindings for modes in a specific Evil state?

I have a set of key bindings that I use for both web-mode and php-mode in insert mode (of Evil). So I cannot use set-local-map or something. Because in normal mode, the same keys will then call other ...
9
votes
1answer
1k views

How can I add a new colon-command to Evil?

evil-mode introduces vim-style colon commands (such as :wq to save and close). I have a few commands (such as kill-buffer, org-babel-tangle) that I'd like to be able to run through this instead of ...
8
votes
1answer
859 views

Cursor moves one position left after exiting insert mode?

I'm using evil via spacemacs. When I exit insert state, the cursor moves to the left one character. Why is that? Is it a bug, or is it a feature? Can I turn it off?
8
votes
1answer
910 views

Difference between `evil-search-forward` and `evil-ex-search-forward`

It's in the title: What's the difference between evil-search-forward and evil-ex-search-forward? When would I want to use one instead of the other? evil-search-forward Search forward for user-...
8
votes
2answers
4k views

How to access os clipboard using Emacs + Evil

How can i yank to/from windows clipboard when using: Windows 7 (x64) GNU Emacs 24.4.1 (x64) Evil 1.0.9 and having (setq x-select-enable-clipboard nil) in my .emacs? (I put this line there because i ...
7
votes
1answer
616 views

Evil mode - How to go into Insert mode after Org-capture with %? cursor placement

After creating an org-capture with the %? to place the cursor, the cursor will be in command mode. Is there a variable for putting it into insert mode or does org-capture elisp code need to be ...
7
votes
1answer
2k views

Remove key-mapping from org-mode

I'm transitioning from VIM (using GNU Emacs 24.5.1). I want to move between "windows" using familiar keys i.e. (global-set-key (kbd "C-k") 'windmove-up) (global-set-key (kbd "C-j") 'windmove-down) (...
7
votes
2answers
619 views

Evil-emacs: how to select last pasted text (like gv)?

How do I visually select the last pasted text with evil-emacs? gv reselects the last visual selection. I'd like a function/snippet that does the same for my last pasted text.
7
votes
1answer
2k views

How can I translate my .vimrc into evil-mode

I have heard of the power of Emacs, but I have a ton more experience with vim and an extensive amount of shortcuts in my .vimrc file. I would like to transfer these mappings over to Emacs evil-mode. ...
7
votes
1answer
928 views

What is “Symbol Highlight Transient State”?

Pressing * (spacemacs/enter-ahs-forward) works like visual star in Vim, except for the mini buffer: What is "Symbol Highlight Transient State" in the mini buffer about? Where is the documentation ...
7
votes
1answer
1k views

Using evil in the minibuffer

evil-mode does not seem to bind keys in the minibuffer. Is there a way to use evil in the minibuffer? It's hard to use Vim-style keybindings everywhere BUT the minibuffer.
6
votes
3answers
2k views

Disable evil-mode when git-timemachine mode is activated

How do I disable evil-mode in a buffer in which git-timemachine is activated?
6
votes
2answers
3k views

Evil: Is there a default register that does not get overwritten by later yanks to explicit registers?

I often use registers in evil, but I have a common use case that I cannot seem to resolve. I would like to have all copied text stored somewhere that does not get overwritten when I explicitly make ...
6
votes
4answers
2k views

In Evil mode, how can I prevent adding to the kill ring when I yank text, visual mode over other text, then paste over?

If I have text1 text2, I yank text1 with yw then I highlight text2 with vw and paste overwrite that text with p, my kill ring now has text2. I'd prefer if text2 wasn't added to my kill ring because ...
6
votes
1answer
1k views

how do I do case sensitive searches using evil/spacemacs?

I'm trying to perform a search and replace in spacemacs but I need it to be case sensitive when by default it appears to be case insensitive. So I try to do :set noignorecase but then I have this ...
6
votes
2answers
864 views

How might I define (or fake) a mode-local ex command with evil?

It is possible to define ex commands using evil-ex-define-cmd. For example, :quit is defined as: (evil-ex-define-cmd "q[uit]" 'evil-quit) I'd like to override this behaviour in particular modes; in ...
6
votes
1answer
6k views

How to learn Dired in Evil mode?

I am learning Dired in Evil mode. h j k l / are Evil keys that obviously work in Dired. Are there others? Is there a table of Evil keys for Dired? I am using Emacs 25.2.1 with Evil, Spacemacs, and ...
6
votes
1answer
1k views

Using cask for package management

I am new to emacs. I'm trying to use cask to manage emacs packages. This is my ~/.emacs.d/init.el: (require 'cask "~/etsi/cask/cask.el") (cask-initialize "~/etsi") (require 'evil) (evil-mode 1) ~/...
6
votes
3answers
470 views

How can I implement Vim's `undo line` command in Emacs' evil-mode?

From the Vim User Manual: 02.5: There's a special version of the undo command, the "U" (undo line) command. The undo line command undoes all the changes made on the last line that was edited. ...
5
votes
2answers
3k views

How to quit evil mode?

My vim-using co-worker came by, and since he wanted to do something with files on my PC, I installed evil-mode to allow him to do this more efficiently (vim user trying to accomplish anything in emacs ...
5
votes
1answer
1k views

How to check the current state in evil mode?

When writing elisp for evil mode, how can you check the currently active evil state?(normal, visual, insert... etc)
5
votes
2answers
970 views

Helm bind “C-j” and “C-k” to list navigation (cursor position)

Is it possible to change binding to navigate throw Helm list via C-j and C-k bindings? I came to Emacs from Vi(m) world and I really want to keep this mapping in my emacs + evil setup.
5
votes
2answers
459 views

Using evil-mode with a function that does not work well with evil-mode

The great org-mode has a fast way to jump between headings in an org file; M-x org-goto or C-c C-j. This doesn't work with evil mode that well. If I am on evil normal mode in an org file, C-c C-j ...
5
votes
1answer
3k views

How to set evil-mode to use evil-emacs-state-mode in new buffers?

So far, I've tried this, but it doesn't see to be working - new buffers still start in normal mode. I'd prefer to default to evils emacs mode, and be able to switch into evil with C-z when I'm ready (...
5
votes
1answer
1k views

How to do case sensitive searches using evil's evil-search?

Unlike isearch, evil-search mode ignores case-fold-search option. Using evil-search like this for eg: (setq-default evil-search-module 'evil-search) Is it possible to make evil-search case ...
5
votes
2answers
288 views

Making `dj` delete two lines in evil mode

dj in vim deletes the current line as well as the next. It's a bit idiosyncratic (in that it doesn't really make sense as a motion) but I've come to rely on it. In evil, however, dj deletes only the ...
5
votes
1answer
517 views

How do I jump to the next sentence in evil?

When i press ) in Vim it jumps to the next sentence. In evil, however, ) (evil-forward-sentence) at the beginning of the following paragraph takes you to the paragraph's end, while in Vim it jumps to ...
5
votes
3answers
523 views

Org-mode: closing the nearest parent

I often find I want to close the nearest parent subtree, but don't know of a better way of doing this than navigating to the header first and then pressing tab. I use evil-mode, so properly this ...
5
votes
4answers
446 views

Globally replace C- with SPC

I want to globally replace C- with SPC in emacs. This should make almost all emacs bindings not awful chords, and should completely avoid colliding emacs with evil/vim. It should also be able to be ...
5
votes
1answer
311 views

How can I get VolatileHighlights to work with evil-yank, evil-delete, etc?

With the guide on extending Emacs, I discovered the volatile highlights package. But it only works on Emacs operations like kill and yank. I would like to use it with Evil operations like evil-yank ...
5
votes
2answers
225 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 ...
5
votes
1answer
942 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}...
5
votes
1answer
643 views

spacemacs key bindings in plain vanilla evil emacs

As the title suggests, I would like to use spacemacs like keybindings in plain vanilla evil emacs. The spacemacs key bindings are very intuitive. But the package is too heavy for my low-end laptop. ...
5
votes
1answer
281 views

Pasting text doesn't work properly in evil-/web-mode

In certain situations Emacs doesn't properly paste text. Apparently this only happens if the current buffer isn't saved and both web-mode and evil-mode are loaded. I was able to reproduce this ...

1
2 3 4 5
9