Questions tagged [evil]
Evil Mode is a Vim emulation layer for Emacs.
549
questions
2
votes
1
answer
336
views
How to configure the delimiter for evil-search-word for C/C++ modes? [duplicate]
Using evil mode, pressing * runs evil-search-word-forward.
But for some reason C/C++ mode uses _ as a delimiter, meaning ID_FOO will only match the first term ID when searching for the next term.
...
2
votes
1
answer
536
views
Executing programs the efficient way with Spacemacs
I'm a Vim user trying to learn Spacemacs. In Vim, I execute a Scheme program by typing :mit-scheme < xxx.scm. After the program exits, I can continue editing simply by press Enter.
However, doing ...
2
votes
1
answer
88
views
Error when folder of an open buffer is deleted outside emacs
I get this error when I am trying to swtch buffer and a folder of an open buffer is deleted outside emacs:
Error in post-command-hook (evil-mode-check-buffers): (file-error "Setting current directory"...
2
votes
1
answer
273
views
Vertigo doesn't work properly with evil motions
I'm using vertigo with evil in the following way:
(evil-define-motion vertigo-j (count)
"Evil vertigo motion. Count has no effect."
(vertigo--jump #'evil-next-line "Jump down: "))
...and I map ...
2
votes
1
answer
291
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 ...
2
votes
1
answer
945
views
M-. and M-, in evil-mode
In normal mode I can't jump to definition with ternjs or cider modes. I have to go to insert then hit M-.
Is that the evil way? Should I have M-. bound to another function that checks what mode you ...
2
votes
1
answer
676
views
Search/substition completion in Evil mode
In Evil mode, in the Normal state, with the evil-search-module variable set to Evil interactive search, I would like to use some kind of auto-completion functionality like Ctrl+n or Ctrl+p so that I ...
2
votes
1
answer
421
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 ...
2
votes
1
answer
117
views
How to make evil keymaps inherit from other evil keymaps?
I changed the i key binding in evil-normal-state-map to go up and k to go down (these are just two examples). But evil-operator-state-map and evil-visual-state-map do not change accordingly, but keep ...
2
votes
0
answers
420
views
(evil-normal-state) seems to have no effect as part of org-agenda-mode-hook
I'm attempting to move from Doom Emacs to vanilla Emacs. I've gotten quite used to the keybindings of Doom, so would like to replicate my most used ones in Emacs. I've used evil, evil collection, and ...
2
votes
2
answers
144
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 ...
2
votes
0
answers
44
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 ...
2
votes
0
answers
40
views
Evil text objects on kebab-case behave differently on dw and cw
I would like my evil text objects to work on kebab-case words, so that dw or cw act on the "whole-kebab-word" and not just on "whole".
Therefor I have put (modify-syntax-entry ?- "w" clojure-mode-...
2
votes
1
answer
621
views
What is evil-mode's equivalent to vim insert-mode completion?
I'm making the move from Vim to Emacs + Evil-mode. I miss Vim's CTRL-X in insert mode to trigger completion of either words, tags, file paths, etc.
I wonder if evil-mode has something similar?
...
2
votes
1
answer
120
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 ...
2
votes
0
answers
287
views
How to make Lisp state a default instead of normal?
I'm learning Clojure and Emacs at the same time 🤕 I use Spacemacs with Evil.
Recently I've learned about Lisp state and I find it very handy. The only problem is that whenever I switch to insert ...
2
votes
0
answers
69
views
Evil text object for innermost paired delimiter?
Q: how can I create a text object for innermost paired delimiters?
evil has text objects to allow us to operate on the standard
paired delimiters like parentheses, braces, brackets, quote marks,
and ...
2
votes
0
answers
44
views
ALT as my modifier key stops me using a pound sign [duplicate]
I've just switched to Spacemacs (Evil mode), as it is time to change things up, having used Sublime Text for years.
I have a British Mac keyboard which relies on ALT + 3 to output the pound sign (#). ...
2
votes
0
answers
653
views
Distraction free writing mode and vertically centered?
One feature, that I really adored in Ulysses is it's typewriting scroll center lock mode (for the lack of a better description). It would keep the line centered, no matter if the cursor is at the ...
2
votes
0
answers
329
views
org-cycle behaves differently for src blocks when evil-mode is enabled
I'm trying to indent my code in org src blocks, but it only works when evil-mode is disabled. I have set this variables for org-mode:
(setq org-src-preserve-indentation t
org-src-tab-acts-...
2
votes
0
answers
113
views
Automatic close evil-make buffer
I'm using evil mode (Spacemacs to be specific) and working with LaTeX projects. I use evil-make or :make command to compile the current LaTeX project to PDF file. I find it quite annoying that ...
2
votes
2
answers
2k
views
Enable evil in specific modes
I want Emacs to default to Emacs bindings, but to be able to define a list of modes in init.el that enable evil-mode.
I want something similar to this:
http://wikemacs.org/wiki/Evil#...
2
votes
0
answers
283
views
Trace Evil-mode commands
At the moment, I only know one way to determine which Emacs functions are called by any given Evil command (e.g. a sequence of key bindings in the Normal state): read the Evil source code.
Is there a ...
2
votes
2
answers
1k
views
Evil mode pasting under line
I'm trying to achieve the following with this:
$pricelist = pricelist();
$hotels[$index ]['id']
I want to copy the bottom line into the pricelist() function like this:
$pricelist = pricelist($...
1
vote
2
answers
1k
views
After-advice for disabling evil-mode in ansi-term has no effect
I'm using evil-mode and trying to make sure that it gets disabled after invoking an ansi-term.
I've tried using before and after advice to advise the ansi-term function, as well as adding a hook to ...
1
vote
3
answers
1k
views
org-mode + evil: insert heading, set cursor to line ending, and change to insert mode?
I am using spacemacs which contains org-mode and evil. Whenever I insert a heading (either org-insert-heading, org-insert-heading-after-current or org-insert-subheading), I have to do two extra ...
1
vote
2
answers
806
views
remap vim keys in evil-mode
I would like to do the equivalent of this
vnoremap p "_dP
in evil-mode. (i.e. I would like paste-replacing to not yank).
I want to do the same for c C and P.
I tried this:
(define-key evil-visual-...
1
vote
2
answers
376
views
What's the difference between :w and :sav in spacemacs?
I'm using spacemacs and while when I create a new buffer with a given name and try to save it into a real file I find that :w won't work but :sav will. What is the difference between those two ...
1
vote
1
answer
2k
views
Resolving keybinding conflicts with Evil-mode: Troubleshooting Image-Dired bindings
I am trying to move/rename 100+ images inside of a directory, so I am using Image-Dired to view the images as thumbnails and as I move/rename them.
I want to move multiple images at a time, so I am "...
1
vote
1
answer
80
views
Spacemacs Evil mode does not have :for?
I tried to use
:for num in [1-30]
today in my spacemacs evil mode. But it says
Unknown command for
Are :for and such command an extension to Vi that is not available for Spacemacs Evil?
1
vote
1
answer
328
views
How do I automatically enter evil-insert-state after running the org-add-note command?
I have tried this out of guesswork but it doesn't work:
(add-hook 'org-add-note-mode-hook 'evil-insert-state)
Which follows the syntax of something that does work:
(add-hook 'org-capture-mode-hook '...
1
vote
2
answers
657
views
Warning while installing evil in emacs
I'm new to emacs (3 days), learning the basics of the ecosystem. I brew installed emacs, and after that I'm wanting to enable evil mode. Here is my init.el
(require 'package)
(setq package-list '(...
1
vote
1
answer
526
views
Change modeline background when in normal evil mode?
how do I change the background of current line when in (evil) normal mode?
I used it in Vim to be able to tell when I am in normal mode or not.
(I am using the terminal app and I prefer to keep the ...
1
vote
1
answer
193
views
Evil-surround: How can I make `ves(` act like `ves)`?
Same question for surrounding with bracket and braces as well. I'd like visually highlighted text to be surrounded without any added whitespace.
Currently ves( on text will result in ( text ) whereas ...
1
vote
1
answer
703
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
1
answer
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
2
answers
342
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
1
answer
859
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
2
answers
307
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
1
answer
228
views
How to implement google/other search engine search of visually selected text in evil mode (counsel-search of selected text)
How can I define a command that searches the web for the evil visually selected text using google or some other search engine? counsel-search already does this if you insert a string, but how can I ...
1
vote
2
answers
473
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 ...
1
vote
4
answers
845
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
1
answer
2k
views
OS copy/paste not working for emacs-mac
GNU Emacs 26.1 (build 1, x86_64-apple-darwin16.7.0, Carbon Version 157 AppKit 1504.83) of 2019-01-27
I just recently installed the emacs-mac port of GNU Emacs 26, and the OS copy/paste functionality ...
1
vote
1
answer
228
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
1
answer
291
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
1
answer
950
views
How to set the evil-visual-line region (selection) programmatically in Emacs Lisp using indices?
Given 2 absolute numbers (compatible with region-beginning, region-end).
How can these numbers be used to set the evil-mode line visual selection?
(note, I originally asked this question, but found ...
1
vote
2
answers
3k
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
2
answers
652
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
2
answers
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
1
answer
403
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 ...