Questions tagged [evil]

Evil Mode is a Vim emulation layer for Emacs.

Filter by
Sorted by
Tagged with
1
vote
1answer
492 views

(Evil) Binding “q” to “View-quit” in view mode (instead of “evil-record-macro”)

I'd like to be able to exit view mode by pressing "q". However, in evil "q" is bound to evil-record-macro, even in view mode. I wasn't able to find a solution using evil-define-key. I was excited to ...
1
vote
1answer
280 views

Mapping evil normal state Y to y$

How can I redefine evil normal state Y to be equivalent to y$ instead of yy?
1
vote
2answers
278 views

Evil equivalent of imap

How do I make ae in evil insert mode produce æ? This would be the equivalent of inoremap ae æ in vim. (I tried (define-key evil-insert-state-map (kbd "ae") (kbd "\C-kae")), but after this typing a (...
1
vote
1answer
2k views

Bind Ex-mode command in Evil

I am trying to bind CTRL-B to perform the Evil command :buffers. The reason I am doing this is because I want to scroll through the open buffers with j and k and then press <RET> to make the ...
1
vote
1answer
661 views

How to delete word in next line with evil-mode?

I use evil-mode (from spacemacs) and I get a strange behaviour which I'm not sure if it is right or a bug. If I delete words (with dw, i think it calls evil-delete), it works until I arrive at the ...
1
vote
2answers
260 views

In terminal, C-) and ) both execute evil-forward-sentence. I want C-) to run paredit-forward-slurp-sexp

If I type C-f paredit-forward-slurp-sexp, Emacs tells me the command is mapped to C-). Yet through C-h k I realized that both C-) and ) run evil-forward-sentence. If I do C-f evil-forward-sentence, ...
1
vote
1answer
363 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?
1
vote
1answer
130 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 ...
1
vote
2answers
2k views

How to paste into ansi-term (evil-mode)

I want to copy some text from my browser and paste it into ansi-term. I am a vim user and I want to give spacemacs a try once again. Naturally what I did was: Opening ansi-term by typing SPC SPC ...
1
vote
2answers
901 views

History of search terms for evil mode?

When searching for text in evil mode using / key, then entering text. The value searched for isn't saved as it is in vim, where the up/down arrow keys can cycle search history. Is it possible for ...
1
vote
1answer
1k views

Spacemacs - start popup terminal window in evil-normal-state

I've added these keybinding configuration in my Spacemacs dot file, so that I can toggle the terminal by press the \ key. ;; Keybindings (define-key evil-normal-state-map (kbd "\\") 'spacemacs/...
1
vote
2answers
460 views

Go to last session's last edit

In vim, right after opening a file, I can type g; to go to the place last edited. This doesn't work in evil-mode with my configuration. Is there something I can do to make it work?
1
vote
1answer
503 views

Can evil-visual-block show inserted text on all lines like string-rectangle does?

In regular (non-evil) emacs, if you select a rectangular region and hit C-x r t to run string-rectangle, inserted text is displayed on all the selected lines as you type. In Vim, if you select a ...
1
vote
2answers
1k views

evil mode with ggtags

I want to use evil mode with ggtags but evil mode keeps taking some of the bindings such as M-.. I'm new to emacs and I'm interested in learning what's going on. At first I tried explicitly setting ...
1
vote
1answer
385 views

Using evil and elscreen together

I just started using evil-mode after having used elscreen for a long time. evil-mode will bind the C-z key to evil-emacs-state but do you know how I can rebind either this function, or the elscreen ...
1
vote
2answers
334 views

How do I auto save evil buffers for specific file types?

I'm a new Doom Emacs user that can't get used to having to save files manually. I found a way to auto save evil buffers, but the problem with this approach is that I'm not able step out of vterm (an ...
1
vote
3answers
368 views

Evil mode send escape before Alt/Meta-command

In vim one can escape normal mode by pressing Alt or Meta then pretty much any key, e.g. Met-j to escape insert mode and move down a line. Holding alt before typing would send an <Esc> key ...
1
vote
1answer
309 views

Emacs + visual line numbers + folding + visual fill column mode

Relative line numbers for me it's a little bit painful topic. I'm using evil (spacemacs) and I want to jump between lines by in vim style like 10j, 4k etc. Is it possible to get line numbers behavior ...
1
vote
1answer
188 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 ...
1
vote
1answer
1k 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
77 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 ...
1
vote
1answer
169 views

Unable to use ediff with emacs and evil due to window configuration

Running emacs 25.2.2 with evil installed and updated from Melpa. When I run ediff, it asks for usual buffer A and buffer B and then ONLY the ediff buffer in its own frame is visible with 'Type ? for ...
1
vote
1answer
425 views

How do i switch to evil-normal-state on save

I am new to spacemacs and currently save fils by s-s (aka: cmd-s). I would like to switch to evil-normal-state each time I save. How do I do this?
1
vote
1answer
245 views

Close found file but not emacs?

I'm using emacs in terminal mode. I open it up and then use c-x c-f to edit a file. I'm using evil mode so I then use :x to save and exit. I end up leaving emacs all together. Is there something else ...
1
vote
1answer
794 views

What does 'State xxx cannot be set as an initial Evil state' mean?

When I try to enter a command such as set number in Spacemacs, I get the error State number cannot be set as initial Evil state. What is an initial evil state and what does the error message actually ...
1
vote
1answer
460 views

In spacemacs org-mode, is there a way to select a region, and surround it with #+begin_quote and #+end_quote?

I'm tired of typing #+begin_quote and the other one manually (couldn't type it, too tired). Is there a way to surround a region with this? I can't help but feel like there must already be a function ...
1
vote
2answers
2k views

How to make end-of-buffer move to the last line not beyond it?

I'm playing with evil-mode and this is one of the things where evil differs from vim. In vim G takes you to the last line, but evil uses Emacs end-of-buffer which for some reason takes me beyond last ...
1
vote
1answer
1k views

How to define mode-specific keys in evil-mode? [duplicate]

I want keybinding X to do one thing in c-mode and another thing in other modes. I'm trying to figure out how to do this in evil, specifically evil's insert-state. I tried setting the keybinding in a ...
1
vote
1answer
112 views

What's missing here

I've got this from a YouTube video about Evil mode but I can't see the entire init file, so I think it's incomplete because it gives me an error. The idea is to disable Evil mode in some modes. This ...
1
vote
2answers
186 views

How can I redefine a key that is currently used as the start of a key sequence?

I want to redefine C-w to run one of my commands. evil has already defined a number of key sequences that start with C-w to run its commands. So my command does not run, Emacs just waits for me to ...
1
vote
1answer
890 views

evil-vimish-fold based on syntax

evil-vimish-fold is really great for custom folds. However it's not clear to me how you would accomplish syntax based folds. Does evil-vimish-fold work with JavaScript mode? Can I set evil-vimish-...
1
vote
1answer
2k views

Disable default key binding in evil mode for evil leader

I'm using evil-leader and bind the leader key to <SPC>. Evil-leader config follows after evil-mode in .emacs file. Problem: Sometimes when I hits <SPC>, it uses default forward char of ...
1
vote
2answers
666 views

Evil-mode remap universal-argument to C-f in normal-mode, without weird C-u behavior

This .emacs file is sufficient to reproduce the problem. (package-initialize) (setq evil-want-C-u-scroll t) (require 'evil) (define-key evil-normal-state-map (kbd "C-f") #'universal-argument) (evil-...
1
vote
1answer
235 views

Does a key-chord that looks to the first character, exists?

My setup GNU Emacs GUI (version 24.4.51.1 (x86_64-w64-mingw32) compiled from Harroogan Emacs.) Package key-chord.el Package Evil-mode Situation I use the Evil mode. I ...
1
vote
1answer
922 views

how to enter into visual block mode in evil on windows?

in VIM on MS Windows, I could use C-q to enter into visual block mode. How about in evil? I tried the same but it doesn't work.
1
vote
2answers
935 views

How do I change only what “dd” does in evil-mode's normal-state in a minor mode

When I press dd in haskell-interactive-mode at the prompt, it doesn't delete anything, because part of the line is read-only. I would like to map dd to 'haskell-interactive-mode-kill-whole-line. this ...
1
vote
1answer
34 views

How can I prevent pasting after org-copy-visible leaving cursor at end of text?

In evil-mode, if I use 3yy to copy three lines, then move somewhere else in my file and do P (evil-paste-before), the three lines are pasted before the line with the cursor, and the cursor is left at ...
1
vote
2answers
37 views

How to copy one register to another?

In vim :let @"=@* will copy the content of* register to the " register. How can it be done with evil?
1
vote
1answer
38 views

c w movement up to next word instead of end of word

In vi, c w stops at the end of the current word (that movement is normally e, as in c e). This is different from w alone or d w, which go up to the beginning of the next word. A popular Vim ...
1
vote
2answers
288 views

Make Evil Mode “s” key behave like Vim

Doom Emacs' s key does not behave like Vim's implementation. In Vim, s deletes the character under the cursor and puts you into insert mode whereas Evil Mode performs a search, similar to f and t. Is ...
1
vote
1answer
85 views

Skip over remaining errors in current file to next error in next file

tl;dr I am using :cn in Evil's Ex command line and would like to use :cnf as well, but it is not there, and I don't know what function to bind it to. Details As a former Vim user who is slowly ...
1
vote
2answers
184 views

Spacemacs evil-mode : How to toggle off visual mode in interactive function call?

;; .spacemacs file (defun my/function (beg end) ;; To work with visual selection: (interactive "r") ;; Displays visual selection in message buffer: (message (buffer-substring-no-...
1
vote
1answer
276 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) (...
1
vote
1answer
159 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
84 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
96 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) ...
1
vote
1answer
95 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 (...
1
vote
2answers
263 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
1answer
246 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 ...
1
vote
2answers
492 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 ...

1
3 4
5
6 7
10