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

Evil Mode is a Vim emulation layer for Emacs.

0
votes
2answers
32 views

how to define an evil-operator to move forward/backward a text-object?

I am trying to define a function that moves to the begin/end of current text-object. First - I define an operator: (evil-define-operator evil-forward-text-object (beg end type) "move to end of ...
0
votes
0answers
4 views

Defining incomplete pairs with evil-surround

Using evil-surround, one can transform word to <em>word<\em> with ysiw<em>. I wonder if there is a general way of defining an incomplete pair (to be completed by em etc.), such that ...
0
votes
1answer
24 views

How do I install the evil package?

First time emacs user trying to install "evil mode". I'm attempting to follow the instructions at https://blog.aaronbieber.com/2015/05/24/from-vim-to-emacs-in-fourteen-days.html. I installed emacs on ...
2
votes
1answer
56 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
1answer
27 views

Setting C-p as helm-projectile-find-file

I put this at the very end of my config file: (global-set-key (kbd "C-p") 'helm-projectile-find-file) On Emacs start I can see that it is getting assigned using C-h k C-p. Then when I actually load ...
0
votes
0answers
31 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 ...
3
votes
2answers
98 views

Help! Emacs empty my 1 year org file

I have used Emacs Org mode for my notes for several years, and I use Prelude configured with evil. Everything works fine. Until a few minutes ago, I found the note file is empty of content. and the ...
0
votes
0answers
10 views

Surrounding a word at point with `evil-surround`

Using evil-surround, how could one craft a function to surround the full word at point with \(..\)? One might start by adding the bind i (which stands for "inline" or "latex inline math mode") to ...
1
vote
1answer
34 views

Assign TAB in markdown mode

Running emacs 25.2.2, general, evil and markdown-mode installed from MELPA. The problem is when I hit TAB on a heading in a markdown file, it does not cycle visibility of content. C-h k TAB shows it ...
0
votes
2answers
52 views

How to unhighlight after searching in evil mode?

I have a text file opened in Spacemacs with evil mode on. When I search for a term by means of /term [Enter] then found "term"s are highlighed. How do I remove that highlighting? I tried / [Enter] - ...
0
votes
0answers
34 views

Define keybindings for org-agenda starting with SPC

Using emacs 25.2.2, general, evil and evil-collection from MELPA. I have the following in my init.el: (general-unbind 'org-agenda-mode-map "SPC") (general-create-definer my-leader :prefix "SPC")...
0
votes
1answer
32 views

C-x and M-x remapped to SPC and SPC-SPC

What would be the best way to configure Emacs to handle the above keybindings for vanilla Emacs? Specifically, I'd like to have SPC work as C-x and SPC SPC work as M-x. I love Spacemacs for the ...
0
votes
0answers
27 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
0answers
24 views

How to avoid entering visual mode when clicking a link while using evil?

Emacs newbie here using spacemacs. How to avoid entering visual mode when clicking a link while using evil? This is particularly problematic in org-mode.
1
vote
1answer
22 views

Evil mode leave insert state if save via I C-x C-s?

I use evil-mode (specifically in spacemacs) working in org-mode documents. Many times, after evaling code via C-c C-c or exporting via C-c C-e, I find myself saving via C-x C-s (old habits die hard). ...
3
votes
2answers
45 views

How to replace an object with selection?

In Evil mode, is it possible to prevent change and deletion commands from putting the replaced object into the selection (system clipboard)? I would like yanking to still do so. I'd like to be able ...
0
votes
1answer
30 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 ...
3
votes
1answer
28 views

Ignore tags in `org-end-of-line` and similar motions

Is there a convenient function for jumping to the last non-tag character in the line of an org-mode heading? For instance... * This is |my header :tag1:tag2: I would like a command that moves ...
3
votes
1answer
106 views

spacemacs key bindings in plain vanilla evil emacs

As the title suggests, I would like to use spacemacs like keybindings in plain vanilla evil emacs. The spacemacs key bindings are very intuitive. But the package is too heavy for my low-end laptop. ...
0
votes
1answer
31 views

orgDefine a keyboard binding that works only in org-agenda when under evil

Using emacs 25.2.2 on Kubuntu 18.04 with evil and evil-org. Here is a very basic question that I could not get a clear answer for, despite googling. I want to define a keyboard binding that works ...
0
votes
1answer
28 views

Evil pastes after point

Evil pastes after point; How do I make it paste at point? 123456|789 Current behavior: 1234567sth89 Desired: 123456sth789
0
votes
1answer
30 views

Change Case of last searched pattern

Is there a fast way of changing the case of the last searched pattern? Inside Evil mode, I press # key to quickly search for keywords at point. And I want to change the case of all occurences of ...
0
votes
0answers
92 views

Evil mode not working

Using emacs 25.2.2 on Kubuntu 18.04. Using list-packages I installed evil. Using customize-variable I added (evil-mode t) in my ~/.emacs.d/init.el file. But still when I restart emacs, there is no ...
0
votes
0answers
18 views

Enable Evil jump to work across all panes instead of only active pane

Is there a way to enable evil-jump-forward and evil-jump-backward to use the jump list of all panes instead of only the active pane? In the gif below, here's what happens: Start on left pane at ...
0
votes
0answers
36 views

How to convert a region into a Python function?

I'm using emacs with evil and anaconda mode for Python. Sometimes I'd like to convert a region or a block of selected lines into a def (or for/while loop, or class). Is there a way to do this ...
0
votes
1answer
64 views

Unwanted indentation in org + evil

From an org heading, pressing evil o will open a new line that's indented according to the heading (org level + 1 spaces). Can this behaviour be turned off?
0
votes
0answers
23 views

How do I use the primary, not clipboard buffer?

Aka the equivalent of xclip -o -selection primary, not xclip -o -selection clipboard. primary is selection, clipboard is Ctrl-C usually.
0
votes
1answer
51 views

Add dired buffers to evil jump list

I want dired buffers to be included in jump list so I can visit them with Ctrl-i and Ctrl-o. One possible catch is that My Ctrl-x d binding is taken by ido-dired. What I've tried so far (without ...
1
vote
1answer
36 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?
0
votes
0answers
41 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?
1
vote
2answers
130 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
68 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)...
0
votes
1answer
32 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
40 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
75 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
15 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
26 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
32 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
45 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
70 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
53 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
84 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
61 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
192 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
140 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 ...
0
votes
2answers
111 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
91 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
72 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
57 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
45 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 ...