Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [evil]

Evil Mode is a Vim emulation layer for Emacs.

0
votes
0answers
47 views

Mark ring in evil

In evil, you can use C-i and C-o to move forward and backward to the recent visited place. If I did many mark action, and want to loop from each of them, how do it effectively in evil?
3
votes
3answers
233 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 ...
1
vote
1answer
114 views

Spacemacs evil-window key bindings not working?

I have these keybindings in my dotspacemacs/user-config function: ;; Modify evil-mode keybindings from hjkl motion to jkl; ;; Motion mappings (define-key evil-motion-state-map "H" 'evil-window-bottom)...
1
vote
1answer
54 views

Evil mode visual block not selecting full lines

I'm in the process of switching myself over to Emacs from Atom, and I set Evil mode because I do a lot of vim'ing on my personal and non-personal machines. It seems Evil mode is working all right, ...
0
votes
0answers
64 views

Fixing Evil inside Emacs terminal mode

I use Evil mode inside Emacs to emulate vim-style editing. In the Xwindows based graphical user interface of Emacs on Ubuntu 16.04, Evil mode works perfectly. When I launch emacs in terminal mode ...
2
votes
1answer
128 views

Enabling all Emacs keys in Evil's insert and replace states

I tried Spacemacs recently and I really liked the idea of their hybrid mode. But sadly, I can't figure out how to do a few things in Spacemacs so I'm thinking of just using Evil in regular Emacs. So, ...
1
vote
0answers
18 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 ...
1
vote
0answers
30 views

Evil keybindings in reftex-toc

I would like to bind j to reftex-toc-next and k to reftex-toc-previous whilst in a reftex-toc buffer. According to the documentation, the keymap active in *toc* buffers is reftex-toc-map. I'm using ...
1
vote
0answers
34 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 (#). ...
0
votes
0answers
56 views

Re-map evil-commentary key in dired mode

I am trying to re-map a key in evil-mode/evil-commentary-mode when in dired-mode. I tried to add a hook to dired-mode to disable the minor commentary mode, but it disables it for other major modes as ...
3
votes
0answers
78 views

Evil: How do I see the partial command I've been typing?

Suppose I am in command mode, and I am in the process of typing 3dd to delete three lines. How can I make evil mode show the (partial) command I have typed so far? In other words, is there an evil ...
1
vote
1answer
68 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
2answers
175 views

How to unbind a key from a command in general.el?

I am using emacs with evil, and space is my leader key, however, space is bind to dired-next-line in dired-mode. So, how can I unbind space, so I can still use it as my leader key in dired-mode, and ...
3
votes
1answer
82 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 ...
0
votes
1answer
277 views

Why do I have to choose evil-org-mode before evil-mode will appear?

I have been working with org mode for some time, and recently installed evil mode and evil org mode via the melpa package tool. For some reason though I cannot run M-x evil-mode (nor does it come up ...
2
votes
0answers
179 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 ...
1
vote
2answers
136 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-...
0
votes
1answer
118 views

Evil - don't yank with only whitespace to register

How can I configure Emacs in the Evil mode to delete an empty line (d d) without copying it but still copy it when deleting a non-empty line? Thanks!
1
vote
0answers
91 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-...
0
votes
1answer
88 views

How to define keys in evil mode command mode

I'm trying to create a shortcut in command mode. Basically, by typing :bl, I want it to execute gud-break. I tried the following (evil-define-key 'insert c-mode-map (kbd ":bl") 'gud-break) However, ...
2
votes
1answer
50 views

How to avoid accidentally writing temporary source-block-edit-buffers to file

When doing literate programming in org-mode, I frequently use C-c '[aka M-x org-edit-special] to enter the source-block-edit-buffer, so that I have appropriate yasnippets etc. I then accidentally ...
2
votes
2answers
184 views

How to show available options with evil-leader? (like spacemacs)

Spacemacs has a nice ability to show available keys when pressing the leader key. How can bound leader keys be displayed with evil-leader ? Or is this only available via a different package?
2
votes
2answers
107 views

Exiting insert mode in Evil mode and saving immediately (Ctrl + [, :w) causes errors

I've recently shifted to Emacs + Evil for my dev setup, and seem to be running into a rather strange issue with Emacs 24: when I exit Insert mode using Ctrl+[ and try to save the file with :w, Emacs ...
2
votes
1answer
72 views

Make evil paragraphs behave like vim paragraphs

I have moved from vim to emacs using evil-mode. I've found that I prefer emacs (as long as I can edit text vim style), but I have one small inconvenience. I've found, mainly while writing prose, but ...
0
votes
1answer
103 views

How to insert/dump all keyboard macros at once?

Is there a way to show all keyboard macros (similar to insert-kbd-macro) without having to first name each macro? Using macros with evil-mode in case this makes a difference.
1
vote
1answer
130 views

Whenever I type a caret in emacs, it waits for me to type another character. Can I disable that behaviour?

I'm a relatively new user to emacs, having just come over from many years of using vim. I'm mostly thrilled with evil mode and emacs in general, but there are a few annoyances still lingering. One of ...
0
votes
1answer
121 views

evil quit-window and evil-record-macro integration

I am trying to replicate emacs standard behavior when it comes to 'q', i.e. when in a buffer where insert mode does not make sense 'q' closes it. So I defined the following function (defun evil-new-...
0
votes
1answer
338 views

Unable to bind SPC as a prefix in general (evil mode)

My setup worked perfectly fine, however I recently reinstalled Emacs and therefore updated all packages as well when starting for the first time. Since then I cant get rid of the warning/error: ...
0
votes
0answers
39 views

Using advice-add messes up syntax highlighting

I have the following (stripped down) code in my .emacs: (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) (package-initialize) (let ((default-directory (...
0
votes
0answers
25 views

How do you remove the last few characters from all lines in a txt file in spacemacs?

How do you remove the last few characters from all lines in a text file? Example: 23193 123252 1 1238 123 1 34356363 11238080123 1 Should become: 23193 123252 1238 123 34356363 11238080123 I'm ...
3
votes
1answer
242 views

evil (vi) keybindings for customize-mode

A recent convert to Spacemacs and I'm having trouble trying to change the keybindings in customize mode. From a customize buffer I can change the state with M-m SPC evil-evilified-state and then it ...
1
vote
2answers
176 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 '(...
2
votes
0answers
140 views

Interactive lambda functions

How do I create interactive lambda functions? (use-package general :ensure t :config (general-evil-setup t) ;;(setq general-default-keymaps 'evil-normal-state-map) (general-define-key :...
1
vote
2answers
124 views

Evil-mode: delete until end of parens/quotes/brackets/etc

Given the following (cursor at |), how can I delete the text , int b? foo(int a|, int b); I was hoping to find a motion similar to how "inner" works (eg d i b), but which only captures the right-...
0
votes
1answer
27 views

How can I constrain a predefined replacement-function to selected text?

When using replace-string from the M-x while having some text selected, it only operates on that selection (specifically, on an Evil visual selection, in my case). However, if I put the same ...
0
votes
1answer
72 views

Evil emacs use `dd` change buffer and paste with `p`?

I'm running evil emacs in terminal mode. I have two files open in buffers I'm switching between with c-x, left/right. I cut a line of text with dd then switch to another buffer and try to paste with ...
0
votes
0answers
52 views

scroll is undefined

I have a strange problem on emacs (tried 25-27) on Windows 7. Apparently it's some of the modes and plugins. This message keeps popping up (I don't do anything apart from focusing on the emacs window):...
0
votes
1answer
113 views

Custom keybinding for jumping down 2 lines on spacemacs (evil-mode)

What I want is to have the option to scroll faster. Currently when in evil-mode normal state when I press j evil-next-visual-line is called. If I hold jthen the cursor moves down. What I want is ...
0
votes
1answer
145 views

How do i switch to evil-normal-state on save

I am new to spacemacs and currently save fils by s-s (aka: cmd-s). I would like to switch to evil-normal-state each time I save. How do I do this?
0
votes
1answer
165 views

Overriding a magit Keybinding using evil-mode and bind-map

I am using evil-mode, magit, evil-magit, and bind-map. I have defined a map with bind-map using SPC as my :evil-keys similarly to what spacemacs provides. Magit defines SPC as magit-diff-show-or-...
1
vote
2answers
388 views

How to paste into ansi-term (evil-mode)

I want to copy some text from my browser and paste it into ansi-term. I am a vim user and I want to give spacemacs a try once again. Naturally what I did was: Opening ansi-term by typing SPC SPC ...
3
votes
0answers
187 views

How to start a new line

I use Emacs with Evil mode, and I'm starting new line with key o. But I prefer to stay in Evil's normal mode, without going into Evil's insert mode, when starting a new line. When reading the called ...
0
votes
1answer
163 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
2answers
68 views

Evil mode interacting with python.el (invoking skeletons)

Skeletons such as python-skeleton-if in python.el has been giving me problems - I never use them but they get invoked unexpectedly. If they are invoked, it is a pain to get out of it and also it ...
2
votes
2answers
181 views

make * in Spacemacs work like it does in vim

In Spacemacs, is there an easy way to make * (which calls the function spacemacs/enter-ahs-forward) work like it does in Vim? That is, I want * to perform forward searching like in Vim, without ...
0
votes
1answer
298 views

How do I bind keys using general.el alongside evil?

My goal is to bind SPC SPC to counsel-M-x. I've tried using this snippet from this post (use-package general :ensure t :config (general-evil-setup t) (general-define-key :states '(normal visual ...
1
vote
1answer
96 views

How to press RET to insert a newline while remaining in “normal” evil mode?

I want to insert a newline by pressing the return key, but keep the normal status in evil mode. In Vim, I can do this by nmap <CR> o<Esc>. What is its equivalent in evil-mode?
1
vote
2answers
79 views

How to make C-g cancel evil-replace rather than typing ^G?

In evil mode, the r command, evil-replace, waits for a replacement character to be typed and replaces the current character with it. Sometimes I hit r by mistake and wish to cancel, so I hit C-g. ...
1
vote
1answer
88 views

Use xcape-like Control_L=Escape only in Emacs evil insert-mode?

I like the idea of xcape for exiting insert-mode by just quickly tapping Control_L, but I don't like how it leaves "unconsumed" escapes around in other modes, or in other programs/terminals, which ...
0
votes
0answers
155 views

Why won't packages I've installed load properly?

I'm brand new to emacs coming from vim. I've read GNU Package Installation, and MELPA. I've installed evil via M-x package-install [RET] evil [RET], and it works in the same session when I run it via ...