Questions tagged [evil]

Evil Mode is a Vim emulation layer for Emacs.

Filter by
Sorted by
Tagged with
0
votes
1answer
19 views

evil mode: delete word starting with backslash leaves the last character

I am using evil mode. In org-mode files, when I try to delete a word with dw and the word starts with a \, the last letter of the word is not deleted. For example, if my cursor is on the b of \begin{...
0
votes
1answer
28 views

evil-mode unmap TAB key from evil-jump-forward

I use evil-mode and evil-collection. The TAB key is bound/maped (?) to evil-jump-forward. I do not know which of the evil-packages or parts did this. I do not use this function. I need the TAB key for ...
0
votes
0answers
15 views

Emacs Evil Mode permanently highlight all instances of text searched using the `/` key

In Emacs Evil Mode, when I search using the / key, it has the following behavior: It highlights all instances of the match as I am typing after pressing the / key. When I press return, it only ...
1
vote
2answers
36 views

How to ask for confirmation before killing any new modified buffer?

What's the best way to prompt for confirmation before killing any modified buffer, including new buffers created by evil-buffer-new, which creates a buffer without an associated filename. Modified ...
0
votes
1answer
34 views

How to disable evil insert key in read only mode

I want to disable evil insert key such as a, i, o in read-only mode (keep navigation key such as j and k), my idea is to disable these keys in local buffer when enabling read-only mode and enable ...
0
votes
0answers
30 views

Pasting from vim to a buffer of emacs

I am rocking quite an idiosyncratic workflow that combines both vim and emacs in a tmux session, on an ssh server. The problem is, if I try to copy (y) something from a (neo)vim buffer and paste in an ...
1
vote
0answers
25 views

org-mode has no syntax highlighting unless I start with evil

When I start emacs with evil-mode in my rc ((evil-mode 1)) I get syntax highlighting for .org files. However, when I do not, I do not get any syntax highlighting, even when trying M-x font-lock-mode a ...
0
votes
1answer
18 views

evil: Make `%s/x/y/gc` use case insensitive matching but do case sensitive replaces

How do I make %s/x/y/gc use case insensitive matching but do case sensitive replaces? In emacs terms, I want case-fold-search but not case-replace.
0
votes
1answer
32 views

Regexp replacement features

In the replacement part of :s in evil I can add commands like \l to lowercase the next char and \L to lowercase everything that follows, but I am unable to find documentation for that anywhere. I ...
0
votes
1answer
21 views

How do I drop to Emacs mode for one command in Evil mode?

In vim, I can do C-O in insert mode and drop to normal mode for one command. Is there a way I can do this in evil, except dropping to Emacs mode for one command? e.g. C-Q C-x C-f where C-Q is in vim ...
0
votes
1answer
34 views

evil/elpy: Auto-fold when opening a file

I am using Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) of 2021-03-28, modified by Debian with elpy and evil-mode. When I open a py-file I want everything ...
0
votes
0answers
18 views

How to dive into the code-folding topic [duplicate]

I am sorry for such a broad question but I have no other idea. I am using Emacs with evil-mode and elpy (for Python files). Not all keyboard shortcuts known from vim are working. When I ask the search ...
0
votes
0answers
30 views

How can I go to the previous buffer, when that buffer is the Org Agenda?

I like to use RET in org-agenda to navigate to the files in which my TODO entries are stored. But getting back to the agenda is another matter. The usual methods don't seem to work. I usually press C-...
0
votes
0answers
11 views

Substituting 'p' for 'N' when doing word searches for prior occurrences

In Doom emacs, when I press * asterisk to do a search for other instances of the word under my cursor, I use the n to skip to the next occurrence. The default vim key for the prior occurrence is N, ...
2
votes
2answers
69 views

Wrap all emacs key-bindings ... override command loop?

---+ 1: BRIEF: How can I wrap all or almost all key-bindings? Both those already defined, and those that will be defined in the future? E.g. can you point me to code that overrides the command loop ...
1
vote
1answer
52 views

Create a function that deletes word on point and replace with the yank register on Evil-emacs

I want to emulate this vim remap in evil-emacs (doom emacs). nnoremap <leader>mpp ciw<C-r>0 I want to change the word on point (I don't mind word or Word, just want the evil-change with ...
0
votes
0answers
61 views

How to override evil-org-mode keybindings

Here is the evil-org pachage I am using: https://github.com/Somelauw/evil-org-mode. All I want to is be able to demote/promote a subtree by pressing M-L/H. I have tried using the way the repo ...
0
votes
2answers
32 views

C-i combination doesn't work with lowercase i [duplicate]

I've configured Doom emacs to run an interactive evil-ex command in visual mode, the reaconfiguration is as below: (defun evil-insert-into-lines () (interactive) (evil-ex "'<,'>norm I&...
1
vote
1answer
39 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 ...
0
votes
0answers
27 views

How to write the result of running an external command to a scratch buffer?

I'm running this ex command in evil mode: :%!grep -E "^\#" how can I write the result to some arbitrary buffer, instead of replacing the content of the current buffer?
0
votes
1answer
100 views

Override org-mode indentation function in evil insert mode

How can I override the org-mode indentation function of TAB in evil-insert-state-map? I'd like it to always fold and unfold the current or parent header, and switch the indentation functionality to ...
0
votes
1answer
23 views

Close only code folds using evil

How do I close all code folds (but not comments) with evil's code folding? For now I'm using evil-close-folds and evil-open-folds, but it closes all folds, including comments. I'm using spacemacs 0....
1
vote
0answers
30 views

Vim help on Emacs using evil-mode?

It would be nice to have the help system present in Vim when using Emacs evil-mode (:help command). I searched online and could not find a way to do this since only the native Emacs C-h help menu is ...
0
votes
0answers
40 views

Is it possible to replicate vim-unimpaired [p paste behaviour?

Evil-unimpaired (https://github.com/zmaas/evil-unimpaired/) tries to replicate vim-unimpaired, but the paste behaviour is just a dumbed down version of the original. The evil-unimpaired behaviour on [...
0
votes
0answers
26 views

How to use Ctrl+K as evil escape?

I understand that the way to rebind the "escape" function while using the eVil mode is something on the lines of (setq-default evil-escape-key-sequence "jj"). But I want to set my &...
0
votes
0answers
28 views

How to use C-j C-k to move window in term mode using evil?

The bindings of C-j C-k to evil-window-down[up] work well every where apart form term mode. term mode rebinds these to C-w j C-w k - this is super annoying! How can i make term use the C-j/C-k ...
0
votes
1answer
84 views

Doom emacs dired +ranger not obeying evil-mode

I am using doom emacs and in my init file I have (dired +ranger) The problem is when I open dired, I cannot press tab to select for example. I have first to toggle off evil-mode. If I do, I lose all ...
1
vote
2answers
32 views

How do I make Evil's C-o work with Org's C-c C-o?

Org mode's org-open-at-point (C-c C-o) works great for internal links, e.g. Stuff to buy: - <<food>> food: - tomato - potato - banana - <<drinks>> drinks: - juice - ...
1
vote
2answers
52 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?
0
votes
0answers
32 views

How <dd> evil keymap works?

d seems to be bound to evil-delete which requires beg and end arguments. I suspect they are somehow obtained from d motion. Let's say I have defun my-delete-line (body). What should go in body to ...
0
votes
0answers
22 views

Preserving evil mode search/replace command history

In evil mode, I use a lot of search/replace with %s/pattern/replacement. I have (evil-select-search-module 'evil-search-module 'evil-search) in my ~/.emacs file. However, some of the past search/...
1
vote
0answers
54 views

Dvorak input mode wrong letters when typing fast, correct, when typing slow

I have dvorak keyboard layout set as input when I am in evil-input mode. However, when I type relatively fast when typing the I get thd. This is just an example, some other "typos" occur as ...
0
votes
1answer
73 views

Regex to handle unicode strings in evil mode

I'm using evil mode on Emacs2 27.1 on OSX. My goal is to search and replace some text containing unicode strings using either of emacs' replace-regex or vim's search/replace functionality. To begin ...
1
vote
0answers
22 views

show which package repo was used to obtain a package

I'm trying to submit a bug report to emacs-evil, and they ask me from which repo evil was installed. I'm just using the version that came bundled with doom-emacs. How can I know which source was used ...
0
votes
2answers
168 views

pipe result of elisp function to a shell command

I wanna pipe the output of an elisp function (emacs-version) to a shell command (xclip). How can I do this? I accept vanilla emacs and evil solutions.
0
votes
0answers
595 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
44 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
58 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
45 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
45 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
63 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
211 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
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 ...
0
votes
1answer
21 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
555 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
98 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
74 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
81 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
31 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
8 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 ...

1
2 3 4 5
10