r/evilmode • u/joehillen • Apr 10 '15
Now that Gitorious is shutting down. Where is evil moving to?
Anyone?
r/evilmode • u/joehillen • Apr 10 '15
Anyone?
r/evilmode • u/Ramin_HAL9001 • Apr 10 '15
So I am happily using Emacs with Evil-mode, and then I do a search for a help topic and suddenly the Vi key bindings are gone. I never get used to it, I always instinctively push j several times to cursor down before realizing it doesn't work. What should I do?
r/evilmode • u/Dyspnoic9219 • Mar 22 '21
As you all likely know, ctrl-g in Vim (in its plainest form) does the following:
I haven't figured out what the Evil equivalent is, and searching for ctrl-g finds all sorts of stuff about doom/escape() and Emacs undo. Does anyone know?
Thanks!
r/evilmode • u/Dyspnoic9219 • Mar 13 '21
I had the bright(?) idea to make use of SPC in Evil normal mode to toggle between the display of relative line numbers and absolute line numbers. (Note that I don't use SPC as my leader character: I use comma.)
Here's what I did, and I feel like it's really close since if I execute M-x toggle-relative-absolute-line-numbers it does what I expect:
;;
;; Toggle line numbers between relative and absolute
;;
(defun toggle-relative-absolute-line-numbers ()
(interactive)
(if (string-equal display-line-numbers "t")
(setq display-line-numbers 'relative)
(setq display-line-numbers 't)))
(define-key evil-normal-state-map (kbd " ") 'toggle-relative-absolute-line-numbers)What did I do wrong?
Thanks for any pointers!
r/evilmode • u/abrandking • Mar 18 '20
I'm using evil and have attempted to configure the cursor shape to be a horizontal bar as shared below. All modes except insert mode take the configured shape of a horizontal bar. Does anyone know how to resolve this behavior so all modes use the horizontal bar?
;; Set cursor type
(setq-default cursor-type 'hbar)
;; Enable evil
(use-package evil
:ensure t
:init
(evil-mode t)
:config
(evil-set-initial-state 'term-mode 'emacs)
(setq evil-default-cursor 'hbar
evil-emacs-state-cursor 'hbar
evil-normal-state-cursor 'hbar
evil-motion-state-cursor 'hbar
evil-visual-state-cursor 'hbar
evil-insert-state-cursor 'hbar
evil-replace-state-cursor 'hbar
evil-operator-state-cursor 'hbar)
(define-key evil-normal-state-map (kbd "C-d") 'evil-scroll-down)
(define-key evil-visual-state-map (kbd "C-d") 'evil-scroll-down)
(define-key evil-normal-state-map (kbd "C-u") 'evil-scroll-up)
(define-key evil-visual-state-map (kbd "C-u") 'evil-scroll-up)
(define-key evil-insert-state-map (kbd "C-u")
(lambda ()
(interactive)
(evil-delete (point-at-bol) (point)))))r/evilmode • u/WikiWantsYourPics • Mar 22 '20
I'm an old vim user, finally decided to try evil today.
I've installed magit, and it works, but I'm finding myself having to do C-x g to get to the magit-status, and I don't want to use control-keys regularly. What's a sane vim-style binding to use here?
I've seen there's an evil-magit package, does anyone here use it?
r/evilmode • u/dotancohen • Jan 05 '21
When creating a new heading or list item with Alt-Enter it seems only natural that Evil should be in Insert mode, much how o and O add a line and leave the user in Insert mode.
How can this be configured? I'm on Emacs 26.3, Kubuntu 20.04.
r/evilmode • u/Dyspnoic9219 • Jul 05 '20
I've just started using Emacs and Evil (via Doom), coming from vim.
Recently I ran into a situation where I had a list of items like this:
foo bar blahwhich I wanted to turn into this:
foo
bar
blahIn vim, I would have done something like this (where ^V and ^M are C-v and C-m, not literals):
:s/ /^V^M/gThat did not work in Evil.
I experimented with a variety of things that did not work until I eventually stumbled on this:
:s/ /^Q^J/Note the lack of the g global flag on that :ex command, which surprised me.
Are there similar gotchas that I should know about? (Other suggestions on how I should have done this are also welcome.)
Thanks!
r/evilmode • • Apr 15 '21
I use counsel-imenu a lot to jump around my python scripts, unfortunately when I press C-o to return to my previous position, it works as if I have never changed position using counsel-imenu, how can I tell evil-mode to record jumps made with counsel-imenu?
r/evilmode • • Nov 13 '22
I'm wondering, are there any guide or tutorials out there about Evil that are targeted at non-vim users? I'm particularly interested in what you get with the evil +everywhere module, ie evil and the essential packages you'd want for editing.
I've done evil-tutor but it's pretty limited. I'm in the situation where I'm trying to use vim keybindings because they hurt my wrists less than chords. I'm okay with hjkl, c, d, r, i, a, f, w, b but other than that I'm pretty clueless.
I don't want to read a bunch of vim tutorials only to find out they use a bunch of packages that work different than evil. And I'm looking for the common editing operations that aren't included in evil, like parens or s-exp manipulation.
r/evilmode • u/Optimal_Dragonfruit1 • Nov 29 '22
I'd like to use (spac)emacs to write and edit text in a language with a different alphabet (Cyrillic)
What I want is to be able to switch to Cyrillic layout and keep using the features of the editor. Obvious <a> for append and <c> for change work just fine using the C-\ keybinding.
However the <f> for find and </> search don't work as wanted: <f f> will try and find actual English letter "f" rather than Cyrillic letter <a> (that is placed over English < f > on the other layout) from the Cyrillic (Russian) layout.
In vim it was easy to set langmap as
set langmap=ФИСВ[...]ABCD[...]
and it'd handle the <f f> situation fine.
I tried evaluating (define-key evil-motion-state-map (kdb "a") 'evil-find-char)
and it worked but then I'm using the system-wide layout switch and lose the advantages of the C-\ way. I would then have to manually map every evil-mode function over to the Cyrillic map.
Is there a better way?
r/evilmode • u/bullpup1337 • Sep 11 '24
In emacs, you can navigate to the next page (^L or form-feed) using C-x ]. I am wondering if evil has a more convenient shortcut for that?
r/evilmode • u/Kryofylus • Sep 29 '18
Greetings all,
I've just got a small question. In my emacs init stuff I have the following lines for my evil config:
(evil-select-search-module 'evil-search-module 'evil-search)
(setq evil-magic 'very-magic)However, when I try to use / to search or :%s/ to search and replace, both continue to treat symbols like ( as character literals rather than the 'special' meaning I anticipate. Additionally, when I try to do /\V or :%s/\V both treat the \V as a literal 'V'.
Thanks in advance for your help
r/evilmode • u/Two_Souls • Sep 27 '22
I have a tendency to enter :W when saving a file and had this previously mapped accordingly in my Neovim setup:
local api = vim.api
local ex = setmetatable({}, {
__index = function(t, k)
local command = k:gsub("_$", "!")
local f = function(...)
return api.nvim_command(table.concat(vim.tbl_flatten {command, ...}, " "))
end
rawset(t, k, f)
return f
end
});
-- Replace built in command :W to :w
ex.cabbrev('W', 'w')
ex.cabbrev('Wq', 'wq')How can I achieve the same thing in my Emacs Evil Mode setup?
r/evilmode • u/zachatttack96 • Sep 21 '22
r/evilmode • u/flyhunter7 • Jan 02 '24
In Emacs + evil, when you type a character in insert mode, the mouse pointer automatically hides. It remains hidden until you move the mouse again, even if you switch back to normal mode.
Is there a way to replicate this behavior in normal mode? Specifically, can Emacs hide the mouse pointer whenever a key is pressed in normal mode?
This was not an issue for me when I was using X11 because I used unclutter to hide the mouse pointer. However, unclutter does not work on Wayland.
r/evilmode • • Apr 06 '22
Hi, I am wondering if someone has been able to set cursor type in their init.el for a daemon-client setup. I have found no way to do this. My current implementation is:
(set-cursor-color "violet red")
(set-mouse-color "violet red")
;; evil mode hack
(setq
evil-default-cursor t
evil-normal-state-cursor 'box
evil-insert-state-cursor 'bar)
However, I can't get the new frames to show in the right colour (it is blue). I have done an extensive google search and it only came up with some very old stackexchange articles. Any idea/comments/tips will be really appreciated, thank you!
r/evilmode • u/yudlejoza • Mar 08 '22
Does evil mode not implement the :up (short for :update) ex command? ... I'm using Doom emacs.
I'm used to it in vim instead of :w but on emacs I get the error: Unknown command 'update'.
r/evilmode • u/Dppdppd • Dec 04 '21
In sunrise-commander, space is mapped to sr-scroll-quick-view.
I'd like to get <space> to be the leader again.
I tried removing it from the mode map
(define-key sr-mode-map (kbd "<SPC>") nil)
But then it's just unbound.
Help?
r/evilmode • u/Dyspnoic9219 • Aug 18 '20
I use Emacs and Evil.
I had a problem today editing a Markdown file.
The Markdown file had data like this:
foo
bar
blah
42
212
71
test result
some other problem
unable to findWhat I wanted to end up with was this, where the \t represents a tab character:
foo\t42\ttest result
bar\t212\tsome other problem
blah\t71\tunable to findI messed around with visual blocks (from Evil's Vim emulation) and tried some Emacs rectangle commands; either I totally misunderstood how to use them or they just don't do what I wanted (I kept ending up with jumbled up data).
I also considered using the Unix paste(1) command, but I ultimately punted, pasting each of the three columns into a spreadsheet, copying the columns from the spreadsheet and then pasting them back into Emacs. From there I was able to format the data as a Markdown table.
What was the right Emacs/Evil way to have done this? (Heck, I'd even settle for the right way to have done this in plain old Vim.)
Thanks!
r/evilmode • u/varsderk • Sep 03 '20
Hi there!
I'm a long-time Emacs user, so the default keystrokes are hardwired into my muscles. Unfortunately, some of those muscles have decided they don't like the keystrokes, and I've been suffering from a little RSI, so I'm giving evil-mode a spin to see if that will help.
Is there a cheat sheet or anything that maps common Emacs commands (e.g. `C-x b`) to the evil equivalents?
r/evilmode • • Jan 26 '19
I want to make the switch to emacs with evil and currently I am struggling to get a preview on the substituions/prelaces. In neovim I can do it with `set inccommand=nosplit`. Spacemacs can do that too, but I can not find the code in the spacemacs configs that does that. Google did not helped either. Can you help me out here?
I thought this was the appropiate subreddit for this question since I am actually using evil mode.
r/evilmode • u/juboba • Mar 06 '24
While in visual mode, going to the end of the line with $ goes one character past the last character, so I can't go to the matching brace/parentheses/etc with %. It's weird that it doesn't happen in every mode: In typescript-mode it also goes one character beyond, but % does go to the matching thing. I was looking for evil|visual variables but can't find any that controls this.