Questions tagged [evil]
Evil Mode is a Vim emulation layer for Emacs.
459
questions
0
votes
1answer
638 views
Issue binding space as leader with evil-mode and general mode
I am currently trying to set up my config so that I can use evil-mode while also using the space key as a local leader for some command while mapping my keys with general.el package.
;; hide tool bar
...
3
votes
1answer
169 views
change evil operators to be non-greedy
I notice that some of the evil around operators are greedy. As in they grab space around the surrounding delimiters. One such operator is the a".
Assuming that my cursor is | when I use va" the ...
9
votes
4answers
2k views
Have Ctrl-a increase a number just like in vim
In spacemacs Ctrl-a is being used to move to the beginning of the line. I'm more used to 0 to move to the beginning of the line and $ to the end, which works in spacemacs.
Ctrl-a increases numbers in ...
0
votes
1answer
410 views
add-hook evil-insert-state-entry-hook is not calling the function
Update: It worked properly somehow after disabling and enabling nyan-mode.
BUT there is no evidence indicating any relationship between them. Because I can't reproduce this problem after it was ...
0
votes
1answer
5 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
- ...
0
votes
1answer
101 views
How do I set evil mode to use the normal state by default in Customize mode?
When I open the Easy Customization in Emacs, I want to be in normal mode instead of emacs mode. Is that possible?
1
vote
2answers
28 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?
2
votes
1answer
97 views
How can I make terms searched with `*` or `#` populate the search history?
In my attempt to have * and # work in Spacemacs as they do in Vim, I've followed the solution posted at this question.
Those keys now work, but there's one hurdle more to overcome: the searched term ...
0
votes
0answers
23 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
15 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
42 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
2answers
58 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 &...
2
votes
1answer
152 views
`M-f` doesn't move to next line in evil-mode
This happens on the Emacs splash page primarily. I can move back to the end of the previous line with M-b but cannot move onto the beginning of the next with M-f.
As an experiment, I'm going through ...
0
votes
1answer
51 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 ...
0
votes
2answers
45 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.
1
vote
0answers
16 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
1answer
17 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
56 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
1answer
33 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
21 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
34 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
1answer
38 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
36 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
32 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
55 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
1answer
34 views
Completing underscored words without making _ a word character
I would like to use evil-complete-previous (or whatever) to
complete strings_such_as_this, which is by default not possible.
It is possible after (modify-syntax-entry ?_ "w"), but this
has the ...
0
votes
0answers
46 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
0answers
103 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
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 ...
0
votes
0answers
34 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
0answers
47 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
2answers
84 views
Removing and adding newlines around expressions
I am in the process of formatting a couple of hundred markdown files and am trying to automate that process. I am having two problems, but I guess I can ask two questions ;)
Goal
I am trying to ...
0
votes
1answer
44 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
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 ...
0
votes
0answers
22 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
66 views
Evil, How do I display visual range in mode-line
I'd like to see the size (number of rows and/or columns) of the visual selection in my mode-line. I use evil. How do I do that?
0
votes
2answers
27 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 ...
12
votes
4answers
3k views
Possible not to use undo-tree in evil mode?
Every so often I run into bugs in undo-tree, where I can't redo, with the following known bug, another report & reddit thread.
primitive-undo: Unrecognized entry in undo list undo-tree-canary
...
0
votes
0answers
21 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
2answers
110 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
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 ...
1
vote
1answer
362 views
Start in insert state based on minor mode
I would like the org capture buffer (which IIUC is in org-capture-mode, a minor mode) to start in insert state; It seems that both the evil-insert-state-modes variable and the evil-set-initial-state ...
0
votes
1answer
63 views
Using evil and org-mode, as my file size grows, there is increasing delay in any command that changes text
There is only delay when changing text: navigation all works instantly, as normal.
The delay has gotten to about one full second now, it's getting pretty bad. The file is around 15,000 lines long, ...
2
votes
1answer
199 views
Generate dynamic keybindings depending on keyboard layout
This is a bit of an esoteric request so I will try to phrase it clearly.
I am currently beginning to learn colemak and doing so through a series of transitional layouts that go by the group name of ...
5
votes
1answer
809 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 ...
0
votes
1answer
137 views
Evil Org-Mode set L and H to tabbar movements
I can toggle org-mode TODO status with L and H when the pointer rests at a org heading. I wish I could bind those keys to tabbar-"movements" to mimic the behaviour I get in all othem mode with this ...
1
vote
1answer
357 views
spacemacs - rebind existing keys
I am trying to rebind j, k key as well as capital E, B and Y, but cannot get them to work. Any pointers?
I put this into my .spacemacs (in dotspacemacs/user-config):
(evil-define-key 'normal key-...
0
votes
0answers
26 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 ...