Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [evil]

Evil Mode is a Vim emulation layer for Emacs.

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

How to select a visual block with the mouse

Old Vimmer and wannabe Doom Emacs user here. I'm trying to set up my init.el/custom.el file so that I can select a visual block (a.k.a rectangle or column) in evil mode with my mouse in combination ...
benutzer_a_b's user avatar
0 votes
0 answers
3 views

Yank to char using avy including the selected character

I want to be able to yank the text to char including the character using avy. For this I wrote the following command: (defun my/yank-to-char-avy () "Delete region from point to a character.&...
Rareform's user avatar
  • 219
0 votes
0 answers
11 views

Evil cursor goes back up to previous line in REPL

In jupeter-repl-mode, when the cursor is on an empty line, right next to the prompt, exiting Evil insert state moves the cursor back to the previous line. I solved this like this: ;;; Fix cursor going ...
Arktik's user avatar
  • 972
0 votes
1 answer
26 views

Can't bind key for Buffer List in evil mode

In buffer list/menu, the key "f" is supposed to open the buffer the cursor is on in the same window as the buffer list. That's what help on the mode says, anyway. In evil mode, this doesn'...
Mars's user avatar
  • 101
0 votes
1 answer
16 views

How can / should I report an apparent bug in ansi-term handling embedded vim processes?

As a regular vi user, I have been using Emacs in Evil mode and ansi-term to use Emacs as a terminal and editor that will display proportional fonts as proportional fonts. I am reaching 99% ...
Christos Hayward's user avatar
0 votes
1 answer
16 views

How to investigate the overriding of a keymap?

In the magit commit message buffer, I once was able to get the previous commit message using M-p in evil edit mode. Exactly how it's expected. Now I'm required to enter into evil insert mode hitting i ...
jjk's user avatar
  • 744
0 votes
0 answers
10 views

Bind ctrl-p in doom emacs

I am trying to map a key to C-p and unfortunately the evil-mc-key-map gets in the way. I am using doom emacs on Mac OS. The command to which it is bound is (evil-mc-make-and-goto-first-cursor) with ...
Rareform's user avatar
  • 219
0 votes
2 answers
64 views

What to do when a major mode overides keybindings set in doom emacs?

[Edit: I should specify that there are many keybindings in the major mode that overide the desired keybinding. They all start with a whereas I would like a to do something else. I already thought ...
userrandrand's user avatar
0 votes
0 answers
46 views

How to find out which key Meta is bound to in a Windows virtual desktop accessed from a Mac?

I am trying to configure GNU Emacs 26.3 which runs in the following setup: There is the Macbook. From this Macbook I connect to a virtual desktop which runs under Windows 10. Emacs runs inside this ...
PravlesRedneckoff's user avatar
0 votes
2 answers
34 views

How to reliably check if at the beginning of the line in Evil visual state?

When I place the cursor at the start of a line in Evil's normal state and then switch to visual state, the function bolp (which checks if the cursor is at the beginning of a line) returns nil. When ...
Hubisan's user avatar
  • 1,735
0 votes
0 answers
11 views

bindings set by general-define-key only work after entering insert-state

;; emacs -Q (emacs version 29.1, emacs-mac) (package-initialize) (unless package-archive-contents (package-refresh-contents)) (package-install-selected-packages) (setq use-package-always-ensure t) (...
user615536's user avatar
2 votes
2 answers
132 views

delete prettify symbol

Suppose that ("lambda" . 955), e.g., is contained in prettify-symbol-alist. Deleting a character (key del; or x in evil, evil-delete-char), with point on λ, results in ambda, only the first ...
Alois Pichler's user avatar
0 votes
1 answer
134 views

Play sound when changing checkbox state in Org Mode?

Context: Org Mode. I want to play a unique audio file when entering each of these three checkbox states: [ ] [-] [X]. So one audio file when entering [ ] state, a different one for [-], etc. Example ...
01AutoMonkey's user avatar
1 vote
0 answers
34 views

delete and start insert

Coming from vim, I use evil, and I am used typing s to replace (substitute) text and continue in insert mode. In normal mode, s is a synonym for cl. In visual mode, s is a synonym for c. Both (cl and ...
Alois Pichler's user avatar
0 votes
1 answer
45 views

How to unindent after Org list

GNU Emacs v29.2 Doom core v3.0.0-pre Doom modules v23.12.0-pre So I want to RET/return after some bullet point lists and no longer be indented, but this is my current issue and I don't know ...
sgript's user avatar
  • 103
0 votes
0 answers
30 views

Problem with undo-tree-visualizer keybindings

What I want I use general, use-package and evil. I want to use evil keybindings in undo-tree-visualizer-mode to jump between nodes and branches using "j", "k", "h", "...
c3f0's user avatar
  • 1
0 votes
1 answer
65 views

evil-delete-line deletes hidden children in org-mode

Calling evil-delete-line from a headline is deleting hidden children. Same behavior with evil-change-line. On a collapsed outline tree how can I delete from the cursor to the end of line while keeping ...
cochrane12's user avatar
1 vote
1 answer
39 views

With evil keybindings, how do I navigate using actual lines only if a count is involved?

Before moving to Emacs, I had a Vim setup that included the functionality to navigate between visual lines with j and k by default, but if there was a count involved (e.g. 20j), "regular" ...
najjt's user avatar
  • 33
0 votes
1 answer
45 views

How to implement avy comment region function?

I am using doom emacs on Mac OS. I would like to have an avy comment region and line command, where just as with for example avy-kill-region the region is selected. I've come up with the following ...
Rareform's user avatar
  • 219
0 votes
0 answers
25 views

How to act on the currently highlighted selection of expand region mode in a function?

I am using er/expand-region in doom-emacs on Mac OS. I would like to combine yanking and expanding a region in a function, that is, automatically yank the selection of expand region with evil after ...
Rareform's user avatar
  • 219
0 votes
0 answers
51 views

snipe-avy - combine evil-snipe with avy, highlighting of the selected chars to jump to avy-style

This is a bit advanced ask, but maybe it's possible. Assuming there are multiple same characters on the same line selected by evil-snipe it would be awesome if one could navigate to other characters ...
Rareform's user avatar
  • 219
0 votes
1 answer
83 views

Evil mode "o" auto indent in text mode - how to turn it off?

When I press o in evil mode (which moves the cursor to the line under, and goes into insert mode), the cursor is indented by two spaces. When I press o, the cursor goes here This happens in text ...
Vinn's user avatar
  • 293
0 votes
1 answer
92 views

How add Evil keybindings to Magit, without removing all Magit prefix-keys

In magit status of a Git repository, you usually press f u to fetch from upstream (these keybindings in Magit will call magit-fetch-from-upstream). With Magit keybindings I have noticed the letters ...
ReneFroger's user avatar
  • 3,880
0 votes
1 answer
119 views

How to use evil-next-line in a function when being in a visually selected mode?

Good day, I wanted to use evil to move a few lines down or up at once, less than with evil-scroll-down/up, but more than one line. I made a brief function: defun go-up-few-lines () "Insert a ...
Rareform's user avatar
  • 219
0 votes
0 answers
18 views

Emacs Evil: Invalid function: evil-ensure-column

I am using evil in Emacs, and I get an error when I use the motions G or gg: Invalid function: evil-ensure-column. My Emacs version is 29.1, and the evil version is 20230919.2206. The motion G calls ...
TakeMuon's user avatar
1 vote
2 answers
56 views

How to set "nojoinspaces" in evil mode

In vim, you can :set nojoinspaces to prevent J from adding a space when joining lines that end in a period. How do I set this in evil mode? I'm using Doom emacs, if that is relevant.
Otto Kaaij's user avatar
0 votes
0 answers
98 views

How to enable evil-mode in Portacle?

I want to start learning Common Lisp and I want to use portacle for an IDE-like experience. As I understand, portacle doesn't provide a normal init.el configuration file. Instead, it uses a file in ...
MySQLInjection's user avatar
0 votes
1 answer
60 views

moving cursor forward-sexp goes one char further in evil mode

When I want to highlight the following region (a ( b ( c ) ) ) ) I get (a ( b ( c ) ) ) ) I mark the beginning and do forward-sexp (or sp-forward-sexp, which results in the same outcome) In, insert ...
eugene's user avatar
  • 489
0 votes
1 answer
76 views

keybinding which will respect minor mode override

I am trying evil mode and want to keep emacs's C-k when in insert mode. C-k is kill-line but when smartparens-mode is on, it's sp-kill-hybrid-sexp So I can't just bind C-k to kill-line in evil-insert-...
eugene's user avatar
  • 489
1 vote
0 answers
83 views

evil, end of line in elisp mode, is hard to execute eval-last-sexp

(setq a "3") If I want to evaluate the line, I'd go to the end of line and do (eval-last-sexp) But in evil mode, the last sexp is "3" not the expression. I can go to the next line ...
eugene's user avatar
  • 489
0 votes
0 answers
27 views

Mixed display-line-numbers-type for evil users?

I want something like: (setq display-line-numbers-type 'mixed) Which count wrapped line as "relative", and count folded line as "visual" Is there any way to achieve this? Say I ...
AidanUnhappy's user avatar
0 votes
1 answer
37 views

How to make my own evil(?) mode? view mode while debugging?

I'd like to switch between two modes source editing mode debug mode (where source is read-only, and you can use all other regular emacs commands + some debug related hot keys (such as n for next) ...
eugene's user avatar
  • 489
0 votes
0 answers
22 views

hydra, let all keys work but not allow insert (self-insert-command)

I am setting up hydra + dap. Although dap-hydra is provided, it messes up keybinding often times. Often, I forget the hydra window is open and type something and messes up typing. Furthermore, when ...
eugene's user avatar
  • 489
0 votes
0 answers
33 views

Copying nvmap-defined keybindings to emacs-state using a different prefix key

I use general.el to define keybindings. For evil-mode, I've use nvmap, using something like the following: (nvmap :keymaps 'override :prefix "SPC" :global-prefix "M-SPC" &...
Dargscisyhp's user avatar
0 votes
1 answer
49 views

Keybinding breaks undo-tree with evil

A few months ago I noticed undo-tree was not working properly for me, though it had never been a problem in the past. Whenever I opened an existing file on my computer and edited it, trying to undo ...
Dargscisyhp's user avatar
0 votes
0 answers
43 views

Keypress is not registered sometimes

I'm using evil mode and I've bound C-g to switch to normal state: :bind (:map evil-insert-state-map ("C-g" . evil-normal-state)) (:map evil-visual-state-map ("C-g" . ...
tap349's user avatar
  • 101
0 votes
1 answer
76 views

define a new evil command

I'm trying to reverse some words, and I have it set up where I can visually select them and hit ,rw to reverse them. How do I set it up so ,rw also works with a motion. E.g. ,rw3w to reverse 3 words? ...
Zaz's user avatar
  • 123
1 vote
0 answers
125 views

Prefix key in general package does not work with emacs start up page (fundamental mode)

I am trying to define key bindings with general.el following emacs from scratch. However, the leader-prefix key (SPC) does not seem to work from the Emacs start-up page (Fundamental mode). It works ...
sm10's user avatar
  • 31
0 votes
1 answer
99 views

How to get a minibuffer state indicator for Evil's `evil-want-minibuffer`?

For regular buffers, Evil has a state indicator in the mode line. But when using Evil in the minibuffer (by setting evil-want-minibuffer to t), there's no state indicator besides the cursor. Viper had ...
mtraceur's user avatar
  • 356
0 votes
1 answer
78 views

How do I use a while loop with a macro?

This works when I remove the loop but with the loop it does not work. (defmacro my/def-key (state map) (let ((x '( (kbd "<leader>z z") (lambda nil (interactive)(message ...
ritchie's user avatar
  • 159
2 votes
0 answers
177 views

What is the relationship between Evil registers and ordinary Emacs registers/kill-ring?

I use evil and have gotten used to accessing the registers via :registers (in normal-mode). This works fine for me except when I attempt to yank a URL or filename into a minibuffer prompt. In trying ...
nonreligious's user avatar
0 votes
1 answer
146 views

Removing a binding from evil-collection

evil-collection is mostly quite useful - but occasionally the default settings shadow my global bindings and I seem to need to restart emacs to remove the binding. I bit up against this problem with ...
Att Righ's user avatar
  • 775
0 votes
1 answer
104 views

How do I unbind the SPC key from a pdf-viewer window and use evil leader key instead?

How can I unbind the SPC keybinding from a pdf-view-mode window and use the evil leader key instead? This is what I have currently: (use-package pdf-tools :ensure t :config (pdf-tools-...
HitoriJanai's user avatar
0 votes
0 answers
21 views

evil-mc binding shadowing my binding?

I use the binding grr for my own command in evil (along with lots of bindings started with gr standing for refactor). I recently enabled evil-mc and which stopped grr from working like it did before. ...
Att Righ's user avatar
  • 775
0 votes
1 answer
34 views

Capital M is behaving weirdly in insert-state of evil-mode

I am observing a strange behavior in evil-mode that I'm unable to figure out what is causing it: In insert-state, pressing "M" does not insert a capital m as expected, but instead gives me ...
NewToEmacs's user avatar
8 votes
1 answer
2k views

DOOM Emacs: Error running hook "global-git-commit-mode" because: (void-variable transient-base-map)

Full error (on the bottom line): Error (doom-first-file-hook): Error running hook "global-git-commit-mode" because: (void-variable transient-base-map) Hello! I'm running this on an M1 chip ...
Krys's user avatar
  • 105
0 votes
1 answer
25 views

Spacemacs keybinding not behaving as expected

The following keybindings work when simply moving. However, when pressing d and then one of these keys, the behavior is not as expected. When pressing dL it will delete until the end of the page. When ...
Veggeata's user avatar
0 votes
1 answer
91 views

change environment in evil-tex

I'm discovering evil-tex, it seems great : I already like the possibility to switch from equation* to equation and vice-versa. There is a manipulation I do very often which is to change \begin{...
Laurent D.'s user avatar
1 vote
1 answer
139 views

In Dired, How to disable (or unmap) SPC from executing dired-next-line?

What I want: While in dired, want to disable/unbind <SPC> from dired-next-line Reason: I use j or <C-n> to dired-next-line in dired, I never use <SPC> as to go next line. I use &...
Garid's user avatar
  • 666
0 votes
1 answer
192 views

Change cursor blinking status upon state change of evil-mode

I'm using evil-mode. My goal is to have a blinking cursor upon entering evil-insert-state, and to have a non-blinking cursor in evil-normal-state. I tried the following but it doesn't work: (add-...
NewToEmacs's user avatar

1
2 3 4 5
12