this post was submitted on 22 Dec 2023
9 points (90.9% liked)

Emacs

2256 readers
2 users here now

Our infinitely powerful editor.

founded 5 years ago
MODERATORS
 

Hello, I like emacs. But I don't like it's default keys, so I use Evil. But the defaults stay. How do I remove them? I know, that's not an easy question, but I'm a bit of a newer emacs user, and don't like the defaults. I know it's possible, I've attempted to use spacemacs, and it gives you the option to use only vi keys (I only stopped using it because I wanted to use my own config).

Thanks

top 8 comments
sorted by: hot top controversial new old
[–] 4ffy@lemmy.ml 6 points 1 year ago* (last edited 1 year ago)

I don't think that's a good idea. Pretty much all interaction with Emacs is mediated through keybinds. There is no distinction between shortcuts and fundamental behavior. Even ordinary typing is done by having each character on your keyboard bound to self-insert-command. Perhaps there is some way to nuke the global keymap, but then you're left with literally nothing. Besides, this would not prevent various modes from adding their own keys anyway.

You should consider whether Emacs keybinds are actually in the way enough to be bothersome. You can also keymap-global-unset (or keymap-unset) individual bindings that you find problematic. I'd also consider delving into the Spacemacs code to see how they implement their "vi only mode."

[–] Ramin_HAL9001@lemmy.ml 2 points 1 year ago

There are "Emacs distributions" like Doom emacs, Spacemacs, and Emacs Prelude which do a better job of making sure all of Emacs uses the Vi key bindings.

As others have said, keybindings are fundamental for a text editor, and other packages are programmed with the assumption that you use the default Emacs key bindings. So it is takes a lot of work to make sure Emacs uses the same key binding "theme" for everything, and across all packages.

Fortunately, there are people who have done all of that work for you, and those are the people who have created Doom, Spacemacs, and Prelude. So I recommend you check out one of those distributions, follow the instructions to install and configure it, and use that instead of ordinary Emacs. Keep in mind that they change almost all of Emacs so you should read the documentation for the Emacs distribution instead of the ordinary Emacs documentation to learn how to do things.

[–] blawsybogsy@lemmy.ml 1 points 1 year ago* (last edited 1 year ago)

is it not possible to just search in the code of spacemacs if you know it can do it? seems like your best bet. if you can't find it searching, ask on the repo? otherwise, as others have said, i wouldn't think it's a simple thing to achieve. best to see if you can reuse the work others have already done.

[–] Thorry84@feddit.nl -2 points 1 year ago (1 children)
[–] 0next@sopuli.xyz 2 points 1 year ago (3 children)

Hey, when I try to type C-x M-c it said it was undefined. And it's not a function in M-x either. I don't know if this is vital info or not, but I'm running Emacs 29.1 debian build.

[–] tusharhero@lemmy.sdf.org 1 points 11 months ago

you need to run M-x butterfly.

[–] GameWarrior 1 points 1 year ago

It’s a reference to this XKCD