Questions tagged [evil]

Evil Mode is a Vim emulation layer for Emacs.

Filter by
Sorted by
Tagged with
5
votes
4answers
665 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
322 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
299 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
1k 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
744 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
296 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 ...
5
votes
2answers
732 views

Map keys in all modes?

Is there a way to bind keys across all modes? For example I have one binding: (define-key evil-normal-state-map (kbd "gt") 'persp-next) This works fine in some modes, but not in others, like org-...
5
votes
1answer
195 views

Emacs evil-mode: how to make visual selection to include diacritics?

For a text "naïve", for example, and the cursor is at "n", if I press vll, "naï" is highlighted, but if I press y, the yanked text is "nai", not "naï". How to make visual selection to include all ...
5
votes
1answer
831 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 ...
4
votes
1answer
4k views

How to remap : to ; in Evil Mode

What's the Evil Mode equivalent of these Vim commands? nnoremap : ; nnoremap ; : vnoremap : ; vnoremap ; :
4
votes
3answers
385 views

Any idea how turn quotes into double quotes?

One of the things that I love in Vim, was the faster way of insert double quotes (saves me hitting the shift key" inoremap '' ""<Left> So when I press the single quote, and type further, I ...
4
votes
2answers
739 views

Moving cursor to the middle of the line where it currently is

Is there a way to define a function that, when called, would move the cursor to the middle (or close to the middle) of the current line, similarly to how we can move it to the beginning and end of the ...
4
votes
2answers
954 views

Always enter emacs mode with ansi-term

I have a freshly installed spacemacs installation and I want to make it so that I ansi-term is in emacs mode. However, I try to add (add-to-list 'evil-emacs-state-modes 'term-mode) to my .spacemacs ...
4
votes
2answers
456 views

Simulate vim splash screen

I've been trying evil mode in emacs. Unfortunately, it does not remind me to "Help poor children in Uganda!" when I start emacs. Is there a simple way to simulate this? Hopefully there's just a ...
4
votes
2answers
1k views

How to list keybinding for a particular keymap (evil-mode)?

I am trying out evil-mode, and it seems promising. Now I would like to get an overview of the keybindings introduced in evil-normal-state-map. If I type C-h v RET evil-normal-state-map I get: Value: (...
4
votes
3answers
1k views

Bind key to a prefix in evil

I have the following definition in my init.el: (define-key evil-motion-state-map (kbd "SPC j") #'evilem-motion-next-line) This works if I want to do dSPCj, but I'd like to be able to do SPCdj as ...
4
votes
1answer
1k views

evil (vi) keybindings for customize-mode

A recent convert to Spacemacs and I'm having trouble trying to change the keybindings in customize mode. From a customize buffer I can change the state with M-m SPC evil-evilified-state and then it ...
4
votes
3answers
2k views

How do I paste code without auto indentation

I just setup the latest Spacemacs. I'm pasting python code from here https://raw.githubusercontent.com/jpmens/mosquitto-auth-plug/master/examples/http-auth-be.py into a new buffer. When I do this it ...
4
votes
1answer
745 views

evil mode: switch back to normal mode automatically after inaction

I was wondering if anyone has ever looked at a way to switch back to normal mode automatically after inaction? In Vim, there are several methods to do that, such as: http://vim.wikia.com/wiki/...
4
votes
1answer
3k views

evil mode - make helm quit with the escape key

I followed this guide to make escape quit from various modes... ;; esc quits (defun minibuffer-keyboard-quit () "Abort recursive edit. In Delete Selection mode, if the mark is active, just ...
4
votes
1answer
171 views

Evil-leader stops working when I eval-buffer

If I load up emacs and go to my .emacs file (a fragment of which is given below), and I press SPC f or C-c C-f then it does find-file, which is the expected behaviour. However, if I type M-x eval-...
4
votes
1answer
313 views

Make delete key also delete region in evil insert mode

In evil insert state, I can mark a region in the buffer using the mouse. If I now press the Delete key (bound to the delete-char command) it deletes the character at the current cursor position and ...
4
votes
2answers
195 views

Bind several minor modes together

This has been driving me crazy, I can't get this to work. I want to link the on-off status of a handful of minor modes, in particular evil-mode, evil-quickscope-mode, hl-paren-mode, and a few others. ...
4
votes
2answers
562 views

zs and ze from Vim?

I use evil-mode, but it doesn't support zs and ze shortcuts from Vim (scrolling horizontally to cursor position). How can i map these keys to achieve the same behavior in Emacs? Some explanation of ...
4
votes
1answer
182 views

Ignore tags in `org-end-of-line` and similar motions

Is there a convenient function for jumping to the last non-tag character in the line of an org-mode heading? For instance... * This is |my header :tag1:tag2: I would like a command that moves ...
4
votes
3answers
1k views

Installing evil-mode: ad-handle-definition 'evil-mode' got redefined

I just installed evil-mode from melpa and when the installation finishes I get the message ad-handle-definition: 'evil-mode' got redefined. I can then enable evil-mode but get the same warning. But ...
4
votes
2answers
379 views

How to replace an object with selection?

In Evil mode, is it possible to prevent change and deletion commands from putting the replaced object into the selection (system clipboard)? I would like yanking to still do so. I'd like to be able ...
4
votes
1answer
949 views

How to make evil paragraph movements work in org mode?

I'm using evil with this sample org file: * test0 test1 test2 test3 * test4 |test5 * test6 When the cursor is on line "test6" and I press { (evil-backward-paragraph), Emacs places the ...
4
votes
1answer
612 views

evil rectangles with point past EOL

When visually selecting rectangles with C-v in evil, the point is not allowed to pass the end of line. This is in contrast with: rectangle-mark-mode cua-rectangle-mark-mode Both of which allow the ...
4
votes
0answers
283 views

Evil: how to execute multiple commands at command line?

I want to execute a list of commands all at once in the evil's command line. In vim, you can use the pipe to execute multiple commands, like this: %s/ó/o/g|%s/ç/c/g How can I do this in evil?
4
votes
3answers
1k 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)...
3
votes
1answer
2k views

How can I disable evil in help-mode?

I have the following in my init.el, and it does a great job of automatically disabling evil in certain emacs modes: (dolist (mode '(git-rebase-mode flycheck-error-list-mode inf-ruby-...
3
votes
3answers
2k views

Using 'jk' to exit insert mode with key-chord or anything else

I'm trying to transfer over from vim to Emacs. I'm using evil to emulate vim modal editing. In vim, I've remapped jk to get me out of insert mode and back into normal mode using inoremap jk <esc>...
3
votes
1answer
378 views

Enter regular command in evil insert state?

I'm using evil (specifically via spacemacs). Is there a way to enter a regular command without leaving insert state? For example, running SPC i u (for adding unicode character) while still in insert ...
3
votes
3answers
804 views

how to supply universal-argument (C-u) to a function call inside a binding statement [duplicate]

I have this on my init.el ;; magit status (define-key evil-motion-state-map "gs" 'magit-status) But I would like to have another binding, for C-u M-x magit-status (C-u is the universal-argument) ...
3
votes
1answer
1k 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 ...
3
votes
1answer
1k views

Evil-emacs: how to make search/replace (:s/) global by default?

Vim has the following setting: :help gdefault When on, the ":substitute" flag 'g' is default on. This means that all matches in a line are substituted instead of one. When a 'g' flag is given to a ...
3
votes
2answers
2k views

Re-creating .vimrc key mappings in Emacs

I've been using vim for a while (though I'm only a basic user) and I've been trying out Emacs (specifically spacemacs). I have remapped H and L to go to the start / end of the line by adding the ...
3
votes
2answers
984 views

How to show available options with evil-leader? (like spacemacs)

Spacemacs has a nice ability to show available keys when pressing the leader key. How can bound leader keys be displayed with evil-leader ? Or is this only available via a different package?
3
votes
1answer
914 views

Open vertical splits to the right

Using spacemacs with Evil. :vsp opens a new split vertical, but it always does it to the left. How can one configure it to open them to the right?
3
votes
2answers
359 views

make * in Spacemacs work like it does in vim

In Spacemacs, is there an easy way to make * (which calls the function spacemacs/enter-ahs-forward) work like it does in Vim? That is, I want * to perform forward searching like in Vim, without ...
3
votes
2answers
4k views

How to bind a key in Evil Spacemacs when the leader key is comma?

I have rebound "SPC m c" so it opens a file (from How to a create keybinding to open a particular file?): (spacemacs/set-leader-keys "mc" (lambda () (interactive) (find-file "~/capture.org"))) And ...
3
votes
1answer
4k views

How to make evil-mode tab key indent? (not re-indent based on context)

Currently pressing TAB in evil insert mode, runs indent-for-tab-command I'm not sure of the exact details, but from what I can tell this is performing some kind of re-indentation, which does nothing ...
3
votes
1answer
665 views

Cannot remap key in evil-normal-state-map

I'm trying (define-key evil-normal-state-map (kbd "o") nil) (define-key evil-normal-state-map (kbd "o") 'evil-end-of-line) but the key remains bound to evil-open-below. FWIW I'm using spacemacs on ...
3
votes
1answer
712 views

How to rebind evil key mappings for delete and friends?

I am looking to rebind some evil mode keys used in navigation and text selection. For example, I am able to successfully map the following evil-mode keys to the following functions: (define-key evil-...
3
votes
3answers
1k views

Make evil-mode more lisp friendly?

I'm asking for several tips to make editing lisp like languages in evil mode better. In particular there is one feature that I would really like but couldn't manage to get it to work. For example ...
3
votes
2answers
371 views

Improve emacs performance when working on large files

I'm a former vim user that switched to emacs + evil with a still relatively simple configuration with only 36 packages. I'm really happy with the additional functionality emacs delivers, but one thing ...
3
votes
1answer
3k views

How do I install the evil package?

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 ...
3
votes
1answer
484 views

Overriding a magit Keybinding using evil-mode and bind-map

I am using evil-mode, magit, evil-magit, and bind-map. I have defined a map with bind-map using SPC as my :evil-keys similarly to what spacemacs provides. Magit defines SPC as magit-diff-show-or-...
3
votes
1answer
856 views

how to get correct indentation after pressing 'o' in haskell-mode using evil-mode in spacemacs

When using haskell-mode (the Haskell layer) with evil-mode keybindings in spacemacs, the indentation created by pressing the o key is often incorrect. For instance, imagine I want to write the ...

1
2
3 4 5
10