Even better idea: How about if you pressed the comma, it would temporarily cause all subsequent keystrokes to be interpreted as if with the Ctrl modifier? Then you could press another key to go back to inserting text. In fact, the editor could even start in the “comma” state because usually after opening a file, you want to first navigate around before inserting text. And to allow typing commas easily, we could just use the escape key instead. I'm sure no one has ever thought of this before.
The idea that a comma is nearly always followed by space or new line, and can therefor be useful is pretty genius though.
A few years ago someone mentioned they map "jj" to escape in vim and I've been doing it ever since. Have you ever had to type two j's' next to each other? I haven't in several years now. :D Only problem is inserting a dozen 'j's before I realize what's going on when I'm on a remote machine...
["string","string"] and [1,2], that is comma-quote and comma-number are both fairly common. Granted ModKey-(#|") is also pretty unlikely to be a command
Devil is non-modal. As soon as you type a complete key sequence, Devil executes the command and gets out of your way. There is no toggling back because Devil deactivates itself automatically on command execution. And then Devil remains idle until you type the Devil key again.
Devil is more like god-mode than Hydra. Hydra is useful for defining your own nested menu of key-bindings. Devil, on the other hand, lets you use the vanilla Emacs keybindings using a different “notation”. This is pretty much what god-mode does too. However god-mode is modal but Devil is not.
If this sounds interesting, make sure to check out Spacemacs[0], which uses a similar principle (tapping a leader key - space), but transforms the editing experience in a much more radical way (evil-mode and such).
I've used Spacemacs for a while, and was quite happy with it, but I wanted a more lightweight editor for the terminal, something I can use on servers and embedded devices without installing an entire Emacs and a zillion packages. So my Emacs setup is much more standard nowadays, and I use mg[1] otherwise.
I started with Spacemacs as my intro to Emacs (coming from VS Code, learning both Vim keybinds and getting the power of Emacs was very intriguing), and I think Spacemacs is much better for total beginners. I eventually felt comfortable enough to move to Doom Emacs and start writing my own config additions, which Doom is much better for imo.
I made the switch a few years ago now, evil-mode is amazing since essentially every vim operation can be used while I also can leverage the massive amount of emacs functionality and packages.
I use both, often I'll use nvim if I'm already in a terminal and want to edit a file quickly. Having two editors, emacs and neovim, which have essentially the same keybindings is very nice since it let's me be more dynamic.
Not an emacs user (sadly), but worth pointing out that one can map modifier keys to other input devices like pedals. It is very helpful if you are dealing with RSIs affecting your hands.
(Admittedly, pedals work well only in a desk scenario. I can't see myself logging them to a cafe.)
can confirm the fast part. Doom Emacs was the first time a pre-packaged editor was much faster than my laboriously handcrafted init file and I was really salty about it. It's a solid project to try out even if you know your way around emacs.
Doom has spoiled me. I started with doom since I was coming from neovim and heard it had good defaults, not whenever I try to start building a config from scratch it's very difficult since I'm so used to the out of the box experience.
Best to add the language server to your application’s runtime anyway.
But for magit or vc you’ll need a remote git and repository, yes.
In my case, I can actually do quite a bit of exploratory debugging using my local Emacs editing files on a copy of the production setup via ssh. I am also leveraging compile mode to run scripts restarting test servers this way.
I guess we prioritize different things. I get annoyed with local intelligent autocompleters for being variable in both what they find and when they find it. I can’t imagine adding a network connection to that equation will improve anything.
I use keyword completion. It always works, it’s never “wrong” or misconfigured, and it’s easy to predict what it does. Just my 20 m$.
Not quite true, you can get magit to work through tramp and you can tell emacs how to run other process that are remote too.
But if the status quo remains as it was in 2022 when I last used codespace, it is a lot of configuration and there might be some things you need to turn off (like for me git-gutter) to get a tolerable experience.
I knew someone would mention tramp ;) I tried it but found the experience lacking. I would rather have a consistent and predictable feature set in a lightweight package, which (for things that I use it for) mg delivers.
One of these days, I will get around to making the ultimate emacs UI: zero defaults.
Give me a way to set and organize keybinds, good documentation, and nothing else. Every time I need a new keybind, I must explicitly decide what it will be. Inconvenient? So is learning the default, or worse, figuring out how my unique config accommodates that default.
It would be more work now for less work later. It would also move the work of UI/UX design into the same step as UI/UX learning; which I consider the most sensible place and time to do that work.
That sounds really neat. I spent a couple weeks trying to publish all my notes using org-mode, and it was pretty frustrating to find all these key bindings on the net that didn't actually work in my setup. A bare setup where you could opt-in to keybinding "packages" with a global way to see conflicts would be cool.
It's been a pet idea of mine for a while, but every time I have tried to implement it, I have gotten tripped up on some UX design decision, or some fundamental, but poorly documented, part of the codebase.
My dream is a doesn't-resemble-vim modal editor from scratch. When I want more functionally, I will give it an intentional home in my normal mode config.
At its core, both Spacemacs and Doom Emacs are configuration frameworks. If you remove all the default packages/layers, you end up with a way to organize all your custom configs, and nothing else.
And under the hood they are complicated wrappers around use-package. With good reason, of course, but that reason doesn't really exist when you aren't using the distribution's configuration packages.
This sounds way more inconvenient to me when you figure in the amount of mistakes you are going to make creating keybindings in the fly. What might make perfect sense at first will seem really dumb once you've added 20 more shortcuts, and then you'll have to either stick with it or start over and relearn.
And seriously, emacs does so much! You won't even know what you don't know if you don't use the work others have done creating the UI (keybindings and shortcuts). Unless you really want to read all the source code yourself too
> mistakes you are going to make creating keybindings in the fly.
I have no clue what you mean. What is a mistake? In the fly? I'm talking about my permanent (until I intentionally change it) config, not some temporary real-time thing.
> What might make perfect sense at first will seem really dumb once you've added 20 more shortcuts, and then you'll have to either stick with it or start over and relearn.
Yes, but the alternative is starting with someone else's mistakes. I would rather deal with my own, because at least then I know what they are.
> You won't even know what you don't know if you don't use the work others have done creating the UI
Isn't that the status quo? If you want to use an unfamiliar feature, looking up the default keybind should be no easier than looking up the function itself.
As someone who works on many different machines during the day the defaults are the only thing that matters. Moving your environment around to every machine you touch is completely impractical and in some cases straight up disallowed by the rules of the lab.
I used to think this way until I spent some time working with and tuning my TRAMP setup. Now that Eglot is shipped with Emacs 29 I've switched from lsp-mode, and lo and behold, dealing with remote LSP servers is a lot easier.
I was a hardcore terminal Emacs and tmux user, but have since switched to GUI Emacs and multi-vterm and was able to retain much of my tmux muscle memory. I now am routinely editing files on a handful of different machines every day, and it's mostly great. I still have to call tramp-cleanup-all-connections to deal with the occasional hangs after a few days of idle time, but I'm pretty happy.
Thankfully for me, 9999/10000 times, I'm using my own system. On the off chance I am using someone else's system, I probably won't be doing anything particularly interesting or staying very long. On top of that, I can usually bring my keyboard, which itself contains most of my divergence from norm.
If customisability were really as available as it should be, it would be trivial to change between configurations. After all, the only technical hurdle is that most software is built on UI/UX assumptions.
It's really cool how emacs has created such a great diversity of control key systems. I use the defaults because I don't use home row, but what a wonderful and powerful experience that users have been able to gather together and create such ecosystems. Thanks Emacs, and here's to many more years with you and many more audacious ideas like this one.
> It's really cool how emacs has created such a great diversity of control key systems.
It's really cool, to say the least. Ive been seriously considering using emacs as a base for building a UI for a project I'm planning that is heavily text based, would be useful since I could define a default keymap and leverage emacs to allow advanced customization without having to clutter the base user experience.
That's funny, I use the defaults because I do use home row. That said, I do use Dvorak, so that may explain why things seems to work better for me than the average other user.
Eh, good timing. I just migrated my config to evil.
I gave the Emacs keybinds a year long chance, got a split keyboard with Emacs-friendly custom keymap (Alt under my left thumb, Ctrl under my right thumb) and life was pretty good, but I can now say that vim editing is hands down better than any Emacs incantation.
That said, vim+Emacs together are even better than each in isolation. Nothing beats modal editing, with access to C-a, C-e, and other Emacs movement keys to be used in INSERT mode. The default evil config should promote this hybrid approach, rather than trying to turn Emacs into vim.
Devil mode looks interesting, but still not as good as a true modal experience.
Having used emacs for 20-ish years, this actually looks amazing. If you didn't RTFA, this is not another vi mode. This replaces holding down Ctrl with tapping comma to get all of emacs' keybindings. It is incredibly clever in the way it does it and I can't wait to try. I think it will make using emacs more ergonomic with regular keyboards and much more so with a phone touchscreen.
You might also find https://web.archive.org/web/20130512065149/http://www.andong... interesting. The theory is that since you only ever have a space after a comma, you can use it as a dead key, and just have ", " output ", ". That then frees all the other letter combos to be whatever key you want.
As described in the Devil manual, you can make the semicolon the active key instead of the comma--you don't even have to leave the home row to trigger commands.
On Linux and macOS I change Capslock to Control in the settings. On Windows I download Power Toys and do the same thing. Makes Emacs so much more useable
It didn’t take me long to start getting hand pain from using Emacs when I started using it a lot. I considered learning the technique of using the ball of my hand to press control. But instead of switching to vi it getting an Emacs hand brace, I ended up switching to a keyboard where I had modifier keys on my thumbs. That was like five years ago and I’ve been fine since then.
My controls are handles by my thumbs (Kinesis Advantage) and I fail to see the advantage here as you are using the same amount of energy, but fail badly for cases where control could have been held down (eg. compare Ctrl-down p-down p-up p-down p-up Ctrl-up to ,-dn ,-up, p-dn, p-up, etc).
I use a kinesis at work and I hate hate hate the placement of Alt. I always have to move my hand entirely and stretching from alt to x is unergonomic and annoying.
The first thing I did (28 years ago) was to remap Delete and Alt, swapping them, pretty much a necessity if you are an Emacs user. On the standard keyboard it's literally just Prgm Del Alt Alt Del Prgm. However I have since replace the keyboard controller and use my own firmware now in where the swap is hard coded.