[HN Gopher] Devil Mode for Emacs
___________________________________________________________________
Devil Mode for Emacs
Author : susam
Score : 111 points
Date : 2023-05-14 10:18 UTC (1 days ago)
(HTM) web link (susam.github.io)
(TXT) w3m dump (susam.github.io)
| Decabytes wrote:
| 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
| xigoi wrote:
| 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.
| pkulak wrote:
| 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...
| gigatexal wrote:
| Hey now ... you're describing vi ;)
| xigoi wrote:
| That's the joke
| zvmaz wrote:
| There's also Meow[1], which I currently use. You have to
| configure it first to suit your keyboard layout, but there are
| pre-built configs [2]
|
| [1] https://github.com/meow-edit/meow
|
| [2] https://github.com/meow-
| edit/meow/blob/master/TUTORIAL.org#k...
| FullyFunctional wrote:
| 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).
| slondr wrote:
| 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.
| andbberger wrote:
| you can easily remap it??
| dan-robertson wrote:
| 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.
| Blackthorn wrote:
| 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.
| TheFreim wrote:
| > 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.
| tmtvl wrote:
| > _I use the defaults because I don 't use home row_
|
| 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.
| ripe wrote:
| Love the idea! Gotta try it, to give my poor Emacs pinky a rest.
|
| I also like the audacious stealing of a common key like COMMA.
| bigdict wrote:
| Remap Caps Lock to Ctrl.
| KerrAvon wrote:
| this is the way
| jacobsenscott wrote:
| YES, BUT IT MAKES IT HARD TO YELL AT PEOPLE, AND THAT'S HOW I
| SPEND MOST OF MY TIME.
| n0on3 wrote:
| I am not quite sure what this says about me but I LMAO
| looking at this one, thanks
| nimih wrote:
| Do you not use your pinky to hit the caps lock key?
| bigdict wrote:
| The Caps Lock key sits a few millimeters away from where my
| pinky rests on the home row. The Ctrl key is a full inch
| away.
| cylinder714 wrote:
| 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.
| accoil wrote:
| 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.
|
| There are other keyboard layouts out there with the same
| concept too: https://github.com/workman-
| layout/Workman/tree/master/mac#wo...
| seanw444 wrote:
| Mode-specific comma key actions are something I never knew I
| wanted coming from other editors.
| ris58h wrote:
| Spacemacs for the rescue.
| thomastjeffery wrote:
| 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.
| vvillena wrote:
| 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.
| krupan wrote:
| 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
| thomastjeffery wrote:
| > 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.
| CTmystery wrote:
| 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.
| thomastjeffery wrote:
| 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.
| jandrese wrote:
| 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.
| thomastjeffery wrote:
| 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.
| spudlyo wrote:
| 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.
| kstrauser wrote:
| Every bit of this horrifies me, and I can't believe you've done
| it.
|
| Outstanding. Well done!
| sph wrote:
| 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.
| rollcat wrote:
| 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.
|
| [0]: https://www.spacemacs.org/
|
| [1]: https://man.openbsd.org/mg
| thomastjeffery wrote:
| FYI, you can use your local emacs to edit remote files via
| TRAMP.
|
| Vim also has this feature built-in: :e
| scp://user@host:port//path/to/file
|
| This way, your config can live exactly where it should: on your
| local system.
| toxik wrote:
| What of Git plugins, linters, make programs? The environment
| is on the host, not your laptop or whatever. There is no way
| around that.
| G3rn0ti wrote:
| If you have the language server installed remotely LSP mode
| works via Tramp, too:
|
| https://emacs-lsp.github.io/lsp-mode/page/remote/
|
| 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.
| toxik wrote:
| 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$.
| striking wrote:
| Well, you can still have that too.
| krupan wrote:
| Yep, tramp handles all that. It's pretty amazing
| dumpsterlid wrote:
| [dead]
| danieldk wrote:
| Also Doom Emacs, which is really stable (pins dependencies),
| fast and has great defaults:
|
| https://github.com/doomemacs/doomemacs
|
| Also, don't use pinky for controls ---- home row mods all the
| way.
| avbanks wrote:
| Switching from Neovim to Doom Emacs has been such a pleasant
| experience.
| aldanor wrote:
| And vice versa :)
| TheFreim wrote:
| 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.
| TheFreim wrote:
| 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.
| seanw444 wrote:
| 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.
| TheFreim wrote:
| I haven't used other configuration frameworks, so this may
| exist elsewhere, but really appreciate dooms cohesive
| configuration scheme.
| Barrin92 wrote:
| 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.
| TheFreim wrote:
| 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.
| dr_kiszonka wrote:
| 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.)
| danShumway wrote:
| I recommend Spacemacs for beginners, but I did end up
| switching from Spacemacs to Doom Emacs primarily for better
| stability, and haven't regretted it.
|
| They're both good projects.
| e12e wrote:
| There's also spacevim:
|
| https://spacevim.org/
|
| And to a certain extent the new Helix editor which uses space
| and context sensitive popup menues for discoverability to great
| effect IMNHO:
|
| https://helix-editor.com/
| [deleted]
| 123sereusername wrote:
| I don't understand wny.
| nine_k wrote:
| Kudos for the very thoughtful write-up explaining the choices
| between particular mapping decisions.
| kleiba wrote:
| See also: https://news.ycombinator.com/item?id=35849788
| krupan wrote:
| 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.
| [deleted]
___________________________________________________________________
(page generated 2023-05-15 23:01 UTC)