Questions tagged [evil]

Evil Mode is a Vim emulation layer for Emacs.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Adding a custom keybinding in Doom Emacs

I am using evil-mode and am very new to emacs and doom. How would I be able to map Ctrl-s to :w or save. Also, how would I be able to bind Ctrl-n to neotree-toggle? I have been searching and trying ...
0
votes
0answers
13 views

centered cursor with evil-window-bottom and evil-window-top

I'm trying to achieve both: persistent centered cursor (cursor stays in center of a window except when near the line 0 and count-lines-page augment the way evil-window-bottom and evil-window-top work ...
0
votes
1answer
30 views

doom-modeline module with line(w) status

As the title implies, what package or feature does line(w) denote? When active, it deletes lines in evil-insert-state upon pressing Enter and then i immediately afterward.
0
votes
0answers
32 views

Configure ryo-modal to execute function from evil-ex-commands alist

I would like some help in configuring ryo-modal, via use-package, to run a command from the evil-ex-commands alist, using ("ll" (cdr (assoc "wq" evil-ex-commands))); however, I'm ...
0
votes
0answers
31 views

Pass keymap as an argument to a function

I have the hard time straggling of passing elisp keymap to a custom function. I expect that after major mode has loaded (in my case it's clojure-mode) my new keybindings become available, but they don'...
0
votes
1answer
32 views

Swap TAB and Escape in all modes including evil

Escape is too far away on modern keyboards and Tab could be easily typed as Ctrl+i in terminal applications. So I found it convenient to replace them in my alacritty terminal key bindings. I am used ...
0
votes
0answers
31 views

From stock Emacs to Emacs Doom - Issues with Key Bindings and de-activating Evil-mode - ORG-MODE use

I have migrated to emacs-Doom and wish to keep the emacs vanilla key-bindings. I also use emacs exclusively for org-mode I have amended the init.el file to remove the evil and removed any attributes ...
1
vote
1answer
29 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 ...
0
votes
1answer
12 views

evil-mode exec register ignores pipe

In vim, assume :r!ls | grep foo is in the register l. You can then do: @l to exec ls | grep foo and insert the contents matching foo in to the current buffer. In evil-mode I get: Usage: grep [OPTION].....
0
votes
0answers
48 views

Getting the TAB key to work the same in Doom as in Spacemacs

When using the TAB key in a magit status/overview buffer, it says: Buffer is read-only. If I manually disable read-only mode, the pressing TAB indents the text instead of expanding or contracting ...
0
votes
0answers
26 views

Autoloading of evil fails: failed to define function evil

I get the error: run-hooks: Autoloading file /home/xxxx/.emacs.d/elpa/evil-collection-20210203.811/modes/unimpaired/evil-collection-unimpaired.elc failed to define function evil at startup. Here is ...
0
votes
1answer
37 views

How to save vim registers in evil mode for use after restarting emacs

In evil mode, I can save text in named registers with "ay etc. These registers are lost whenever emacs is restarted. Is there a way to save these registers? Vim seems to do this automatically.
0
votes
0answers
44 views

Can I combine key-chord-mode with evil-define-key?

I like to use evil-define-key like so: (evil-define-key 'normal projectile-mode-map (kbd "M-o") 'projectile-switch-to-buffer) This is great because I can make bindings for both an emacs ...
0
votes
0answers
20 views

Programmatically call evil-search-forward and then paste

How do I create an elisp function to call evil-search-forward and then paste to search for the last text yanked/copied? I've tried calling commands such as evil-paste-after or yank (see below) but ...
0
votes
0answers
6 views

How can I make the cursor place properly when hitting enter inside an empty object, without exiting “insert mode”

This is mainly for js2-mode, but would love to have it in python or other programming languages as well. I would like to have the cursor placed as seen in the below image when hitting enter inside an ...
0
votes
1answer
26 views

Execute function by using evil-set-register

I use evil and I want to execute a function by using Emacs macro system. Let's say I have the following macro. (evil-set-register ?f [?i ?f ?o ?o ?b ?a ?r escape]) I can run the macro by using @f. ...
0
votes
0answers
19 views

Symbol Highlight Transient State select all words

I am using Spacemacs. I want to move between variables easily and while using #spacemacs/enter-ahs-backward function. I want to select the even word near of some special characters like $!:<> ...
0
votes
0answers
37 views

Adding custom text above and below a buffer

Is there an easy way to wrap a buffer in emacs with text of my choice? For e.g if my selected buffer is like this, This is the first line of a verse with । And here comes the second line ॥ 1.2 ॥ I ...
0
votes
0answers
25 views

Echo area in Evil mode

I was wondering if it is possible to convert the echo area into something like what you get when you press C-f after : (in ex-mode)? One of the packages I am using gives me a modifiable (long) string ...
0
votes
1answer
129 views

Search and replace in evil mode

I'm an emacs newbie and am using evil mode for text formatting. I have some text in the following format: word1 = meaning with elaboration; word2 = simpler meaning; word3; word4 = much long ...
0
votes
2answers
26 views

How to act on the currently highlighted search result with evil mode?

When using evil mode search, is there a way to act on the currently highlighted search result by... Converting it into a selection. Treating it as a text object. Having the ability to specify the end ...
0
votes
2answers
86 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 ...
0
votes
0answers
11 views

Can't run command using C-. keybinding with Evil

I'm trying to use racket-mode for programming Racket. One of the racket-mode commands is bound to C-c C-. (control c, control period). However, whenever I try to press C-c C-., it appears to get ...
0
votes
1answer
79 views

Leave evil's insert state with Control + c

I would like to be able to leave the insert state (I think that's what it's called in emacs?) using the Ctrl+c combination I know from vim. I'm using doom-emacs in case that's important, and I'm ...
0
votes
0answers
37 views

How to set leader-key-like chord sequence in Evil mode?

I am using Spacemacs with evil mode and this works: (define-key evil-normal-state-map (kbd "m") 'set-input-method) However, I would like to use something like this: (define-key evil-normal-...
0
votes
1answer
24 views

How can I move the cursor from a shell window to another window in Evil mode?

Imagine I have following four windows in Emacs: Window 1 is a shell window (M-x shell). Windows 2, 3, and 4 are normal windows with files open. Evil mode is enabled. If I am the shell window, how can ...
0
votes
1answer
55 views

How can I re-enable `C-z` in evil mode (to pause Emacs)?

I have been using Emacs for a while and recently started using evil mode. I exclusively use emacs-nox (command line emacs). The only thing that's missing for me is C-z to pause emacs and bring me back ...
0
votes
1answer
50 views

Any way to remap the meta key with evil?

Function modifiers in Emacs conflicts with many hotkeys I have (for example, conflicts with i3wm). By using evil I could use evil to avoid most of conflict hotkeys. However, I do still need to use ...
0
votes
3answers
120 views

elpy (and evil-mode) do not react on TAB

This is my elpy-config 1Elpy Configuration 2 ...
2
votes
2answers
157 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 ...
0
votes
2answers
44 views

How to loop over keymaps and assign keys?

If I have a key binding I want to apply to multiple keymaps, for example. (evil-define-key 'visual c-mode-map (kbd "C-M-?") 'c-comment-from-c++) (evil-define-key 'visual c++-mode-map (kbd &...
0
votes
2answers
189 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 ...
0
votes
0answers
277 views

I broke Spacemacs

After editing my .spacemacs file, spacemacs is saying that there is an unmatched parenthesis and I need to go into startup recovery mode. After looking at the file, I have not found any problems. ...
1
vote
0answers
16 views

How to get the “number prefix” to be used in a function? (evil mode)

With emacs evil-mode, you can use number prefixes before commands (like in vim). For example 10j goes 10 lines down. I am trying to define a custom function which can make use of these "number ...
0
votes
0answers
30 views

Evil and adding a binding for evil-ex-define-cmd globally for tabbar mode

I’m using spacemacs: •  How can I (globally —ie, permanently) bind a new command :tabe to open a new tab in the emacs built-in minor mode TabBar? •  Right now, :tabnew works. But I want to make :tabe ...
0
votes
1answer
33 views

Spacemacs, Lisp, Pasting and the missing Space

When editing Lisp or Clojure in Spacemacs (Emacs with Evil) I find the pasting behavior anoying. Say I have yanked bar and want to paste it as a parameter to (foo) so I get (foo bar). The problem is, ...
0
votes
1answer
51 views

How to remap the search backwards evil-ex-search-previous command of evil?

I want to remap evil-ex-search-previous to some other key than ,. I tried (define-key evil-motion-state-map "," 'evil-avy-goto-char-in-line) (evil-define-key 'normal magit-mode-map ",&...
0
votes
0answers
77 views

Disable evil-mode in eshell

I have disabled evil-mode in eshell by (evil-set-initial-state 'eshell-mode 'emacs) but when I switch windows(accidentally) using C-w k from eshell, evil-mode gets enabled. How do I prevent this ...
0
votes
1answer
39 views

Hardline Wrap and Emacs Keybinding

The terminal interface to Emacs is marvelous and I like how it handles parentheses. I have two questions as I'm trying to move to Emacs as both a writing and coding environment. I installed a minimal ...
0
votes
1answer
56 views

Disable Evil-mode's state indication on mode line

How do I disable evil-mode's state indicator on the mode line? I don't want to see anything like <N>, <I>, <V> on my modeline.
0
votes
0answers
31 views

How can I remove clipboard from being the default register?

I'm using emacs with evil keybindings (specifically spacemacs). The default behavior of the paste command p is to paste in the clipboard, and default behavior of the delete command d is to put the ...
0
votes
0answers
88 views

How to trigger a hydra when entering evil-mode normal state?

I have the following: (use-package evil :hook (after-init . evil-mode) (evil-normal-state-entry . hydra-evil/body)) When leaving the emacs state (with C-z) and entering normal state, all my ...
0
votes
0answers
24 views

execute a function when emacsclient opens a frame

I am using emacs-evil and when I open a new frame on X11 I can normally use ESC key switch between writing and command mode. But in terminal it won't work, and it just trigers meta. I have been able ...
0
votes
1answer
75 views

create new keybinding for command mode in evil mode

I am using doom emacs and would like to create a keybinding to run the following line so that I don't need to write it every time I want to run a block of code of python :w !python The above line ...
0
votes
1answer
58 views

Archive all marked entries with evil-mode

I recently switched to evil mode and cannot figure out how to archive all marked entries at once. The way I did it earlier, when I was in a list seeing the candidate entries for archiving I pressed * ...
0
votes
1answer
213 views

Remapping the `g` prefix key for all modes (Evil, org and outline minor mode), assigning a single function to `g`

The question is quite intricate. I am using doom-emacs and evil and I am customizing the keys. Usually, something like (define-key evil-normal-state-map "g" 'evil-paste-after) would work. ...
1
vote
1answer
89 views

Change C-z from Minimise to Toggle Evil Mode

I am a fairly new emacs user and would appreciate any help you could offer. I have recently installed the evil mode package onto my emacs. The package itself works perfectly, however, the default ...
0
votes
1answer
19 views

Can behavior of `W` be changed by modifying syntax entries?

I want dW and dB to not delete brackets in racket (all 3 kinds [, (, {). I'm looking at changing W and not w because w is still useful for changing parts of an identifier, e.g. I can easily change ...
1
vote
1answer
59 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 ...
0
votes
1answer
39 views

Emacs keeps overwriting files in Haskell mode

I'm using emacs: GNU Emacs 26.3 Copyright (C) 2019 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the terms of the GNU ...

1
2 3 4 5
10