[HN Gopher] Ask HN: Any fun ways to learn Emacs?
___________________________________________________________________
Ask HN: Any fun ways to learn Emacs?
I've been using vim for years, but after a traumatic brain injury
my muscle memory for typing got a bit scrambled at the same time my
need for something that was _always_ installed everywhere dwindled.
I'd kind of like to finally see what the deal is with emacs, but as
holding down multiple keys simultaneously is now more than a bit
hard (and so is memorizing all the chords) I'm looking for a game
or typing tutor or similar sort of experience that can help me pick
up emacs gradually and help me build a new muscle memory without
having to actually work on anything important. Over the years I've
seen a bunch of games aimed at getting used to vim-style
navigation, but not come across anything emacs-centric.
Alternatively I suppose I could just got evil, but as I've not used
emacs practically I'm a bit confused how you don't end up with a
hybrid of home row touch typing plus having to wander about for
whatever chords remain, which seems more like the worst of both
worlds rather than the best.
Author : yawpitch
Score : 71 points
Date : 2024-04-25 11:38 UTC (2 days ago)
| foobarbaz33 wrote:
| Minesweeper is a nice Emacs game I like to play. It gets you
| familiar with the basic Emacs movement keys.
|
| install it: M-x package-install minesweeper
|
| play it: M-x minesweeper
|
| movement (control key optional): n, p, f, b
|
| bigger movement across the field: M-f, M-b,
| C-a, C-e, M-<, M->
|
| step on unit: Space
|
| step on all surrounding units: c
|
| mark a mine: m
| yawpitch wrote:
| Ahh, brilliant find, thanks!
| PurpleRamen wrote:
| You should look into which-key, which is a popup showing active
| key bindings in the active context. And maybe start with a
| configuration-pack like doom-emacs or spacemacs, as they have
| good support for the vim-bindings, as also come with which-key
| pre-configured. And as I remember, they also allow deactivating
| vim-bindings if you want the pure Emacs-experience.
| yawpitch wrote:
| Thank you for pointing out which-key, that sounds extremely
| helpful.
| opan wrote:
| M-x tutorial
|
| or
|
| C-h t
|
| How fun it is probably varies by person, but I found it kind of
| enjoyable, also coming from vim. One of my favorite things emacs
| had that vim doesn't is a simple default bind to scroll the
| "other" window, good if working on two text files or if you have
| documentation open in the other one. I'm back on (neo)vim these
| days, but I learned a lot of neat stuff using both spacemacs and
| emacs with my own config, and they influenced my vim config later
| on. I have a bunch of custom binds using space as the leader key
| in vim now. Both duplicates of default binds like saving the
| file, and new macros/functions I use a lot (such as deleting the
| second line from two side-by-side files and saving both).
|
| If you're into streams or stream recordings, watching Xah Lee can
| also be insightful. I learned about M-x describe-char from him
| and I consider it a killer feature. One of my very few neovim
| plugins I use is to get a similar thing outside of emacs. Nice
| for identifying emoji you can't see clearly (or want to know the
| shortcode for) or checking if some weird zero width stuff is in
| your text or if that colon or period is actually a unicode
| lookalike.
| yawpitch wrote:
| Thanks for the breadcrumbs, I'll check out Xah Lee.
| sargstuff wrote:
| Perhaps doom emacs ( vim & emacs )[1] or spacemacs[2]?
|
| [1] : https://www.youtube.com/watch?v=1ZWm8B5t8B4
|
| [2] : https://www.spacemacs.org/
| yawpitch wrote:
| Thanks. I do like the idea of best of both worlds, but I also
| feel the draw of starting from a blank slate in terms of
| configuration. I'll check them out.
| BitNomad wrote:
| I'm sorry to hear about your injury, but it's great to see your
| determination to learn and adapt. You might want to check out
| emacs-tutor, a package that provides an interactive tutorial
| inside Emacs itself. This could be a good starting point to get
| used to the basic commands and gradually build up your muscle
| memory.
|
| Also, consider using god-mode. It's an Emacs package that allows
| you to reduce the number of key chords you use by entering a
| command mode where single keys correspond to commands, similar to
| Vim.
|
| Regarding your concern about using evil-mode, it's true that it
| might feel like a hybrid of Vim and Emacs. However, many users
| find it to be a good balance that leverages the strengths of both
| editors. You could customize it to your liking and gradually add
| Emacs keybindings as you get comfortable.
|
| Remember, the key to learning Emacs (or any editor) is gradual
| practice. Don't rush yourself, and take the time you need. Best
| of luck on your journey!
| yawpitch wrote:
| Thanks for the advice, god-mode sounds like it could be a big
| help for me. Main thing for me is just learning what chord-
| style combinations are, practically, used most often and also
| conflict with my more-distorted-than-prior ergonomic needs.
| xanderlewis wrote:
| Was this comment by any chance written using an LLM? It really
| sounds like it was, but I could be wrong...
| nequo wrote:
| It looks like it was. Ghostbuster.app reports 93% probability
| and gptzero.me reports 100%.
|
| I was pleasantly surprised that the message started
| empathetically because none of the other responses did. But
| it makes more sense now, an LLM would do that.
| sph wrote:
| Indeed, LLMs have that distintive and slightly revolting
| quality of friendly, helpful and inoffensive tone that
| reminds me of American customer service ideals. Also the
| user's profile is equally toeing this line of uncanny
| valley.
|
| I guess the only way to identify ourselves as human is to
| adopt a measure of rudeness, some grammatical mistakes and
| snark that those stupid AIs still try to avoid at all
| costs.
| yazzku wrote:
| Hey, but at least it values equality and diversity.
| spit2wind wrote:
| The thing about Emacs isn't it's key bindings. It's the
| extensibility and integration of the overall system.
|
| As others say, begin with the built in tutorial. It should be as
| simple opening Emacs and pressing enter. If for some reason it's
| not that simple, open Emacs and press Control+h followed by 't'.
| The tutorial walks you through the basics. The tutorial mentions
| C-h v. There is also C-h f for functions.
|
| Next, when you're ready, learn Emacs Lisp. You can read An
| Introduction to Emacs Lisp online or within Emacs (using C-h i
| eintr).
|
| Otherwise, hack and extend it. The joy of Emacs is that it
| presents you with programming problems at the threshold of your
| understanding. You decide whether to dip in. It provides you
| amazing resources to do it.
|
| I hope you find a speedy recovery to your injury and have fun
| with Emacs.
| yawpitch wrote:
| Thank you; extensibility in a lisp is one of the draws for me,
| I just wish it was easier to re-teach my brain's relationship
| with my fingers.
| wiktor-k wrote:
| > The thing about Emacs isn't it's key bindings. It's the
| extensibility and integration of the overall system.
|
| Well, I guess Emacs is many things to different people. After
| using Helix for quite some time the single thing I missed was
| exactly the Emacs keybindings. Not plugins, although I've used
| quite a lot of them.
| elwell wrote:
| I like how I can use my Emacs-learned keybindings to navigate
| native text fields in the OS (e.g., CAPS(ctrl) + a, or + e,
| to get to line beginning and end; also +h instead of
| 'delete', keeping my fingers on the home row).
| spit2wind wrote:
| I miss the bindings, too, when using applications that don't
| support them. In those situations (and other situations
| beyond simple key assignment), I reach for the extensibility
| to modify the system...and find nothing that compares.
|
| I'm curious, what do you like about the Emacs key bindings?
| Is it the GNU system integration, like with Bash?
|
| At some level the keybindings are arbitrary. Some were
| designated before the contemporary keyboard existed. Of
| course, they may fit you better just because and that's
| great.
| trelane wrote:
| For me, it's being able to do much, much more than the
| "standard" editor keys, and the (mostly) coherence. And the
| ability to easily add more to do what I want.
| wiktor-k wrote:
| > I'm curious, what do you like about the Emacs key
| bindings? Is it the GNU system integration, like with Bash?
|
| Nah, I actually don't use them I'm Bash that frequently.
|
| It may be just due to the non-modal way of the hot keys.
| With Helix I frequently press Esc far too many times to be
| sure I'm in a right mode (just like I press C on a
| calculator a couple of times to clear it).
|
| I've got caps remapped to control and somehow most of the
| shortcuts that I use quickly got into my muscle memory in a
| way that Helix's don't. I guess it's just hard for me to
| put into words why is that.
| sp33der89 wrote:
| Using meow:https://github.com/meow-edit/meow I actually
| got keybindings in Emacs that are helix-like, so I use
| helix for certain projects and Emacs for others.
|
| The muscle memory transfers well.
| orge wrote:
| I recommend command log mode (tells you what command you just
| executed with that keypress), 'embark-bindings' (what keys can I
| press now), embark-act ("smart" what can I do at point), and
| maybe keyfreq (make common actions easier (haven't tried this one
| myself yet)).
|
| Also, if you decide to use evil (I like it), use evil-collection
| as well to make it play nicer with other functionality.
| hprotagonist wrote:
| really i think the game is: C-h t RET
|
| and then touch notes.org && emacs notes.org
|
| and then futz around! The tutorial should tell you what C-h v and
| C-h f do, so those will be handy. I like helpful.el for a
| nicer/more thorough interface that's not quite info, and I really
| like vertico/consult/marginalia for making M-x nicely searchable
| with hints and stuff.
|
| For navigation, i like devil-mode, avy, eglot/xref, transient,
| hydra.
|
| I don't really like starter kits like doom, but they're popular
| and i guess people like them.
|
| package.el is fine for installing packages, but i use straight.el
| or elpaca.
| ews wrote:
| I highly recommend just doing Doom emacs with evil as a daily
| driver (that's similar of what I did) and then going through the
| Emacs from Scratch series from Systems Crafters
| https://systemcrafters.net/emacs-from-scratch/
| licebmi__at__ wrote:
| As an emacs fan, I consider emacs bindings awful, so I wouldn't
| recommend learning emacs style navigation.
|
| And as other people mentioned, the big part of emacs is on the
| extensibility of the system itself, everything is manageable by
| the lisp engine as emacs is the lisp engine more than a simple
| editor.
|
| So my recommendation to learn emacs in a fun way is to install
| evil, open a buffer, bind `eval-buffer` and `eval-last-sexp` to
| something you feel comfortable, and write your own game to learn
| what emacs can do.
| gaws wrote:
| > I consider emacs bindings awful
|
| Mapping control to caps lock is the first step to Emacs
| enlightenment.
| throwaway148284 wrote:
| M-x snake
|
| Use the emacs keybinds to play it.
| anthk wrote:
| This is Emacs, you can just use the menu items for almost any
| option.
|
| You learn one chord: Ctrl-h m, to describe the keys on the mode
| you are.
|
| For instance, run Alt-x eww (intro), now you are at Emacs' web
| browser. Press ctrl-h m to show the keys for eww.
|
| Also, basics to navigate with multiple windows:
|
| ctrl-x 0: close the other windows
|
| ctrl-x 1: set the current window as a single, enlarged one.
|
| ctrl-x b: switch between buffers
|
| ctrl-g : cancel, everywhere.
| chuckadams wrote:
| Having used emacs for over 30 years, I suggest that the first
| thing you'll want to learn is how to bind keys. The default
| keymaps for nearly everything in emacs are generally awful. Just
| search for "my .emacs file" or "dot emacs gist" and you'll find
| oodles of examples to start from.
| kfogel wrote:
| The most important factor in my learning Emacs was doing it in a
| room with experienced Emacs users. I really strongly recommend
| doing this if you possibly can. A few minutes of an experienced
| user shoulder-surfing while I worked, and giving advice on better
| ways to do things, was worth hours of self-directed study.
|
| Get together with experienced users in person and have them watch
| you edit. That's it.
| _giorgio_ wrote:
| Use vim in insert mode?
|
| https://stackoverflow.com/a/11464768/3529997
|
| Additionally, there's something called "Easy mode", started from
| vim -y or evim. It's a more radical departure than just starting
| in insert mode: it has some key bindings matching other editors',
| and normal-mode commands are done by hitting Ctrl+O instead of
| Esc. As a consequence of that, being in insert mode is the rule
| rather than the exception.
| precompute wrote:
| I use evil, and prefer it to Emacs' native bindings. Evil
| overwrites some native Emacs binds, and the rest can still be
| used. This kind of a hybrid system is very useful IMO. For
| example, I can hit <F3> to record a macro. Instead of having to
| remember a register and being careful not to hit q, I can do
| practically anything. Being able to write your own functions is
| amazing.
|
| I'd recommend trying to write small programs in elisp to get
| familiar with emacs. - Message the current buffer's path - run an
| async command - copy the line in the center of a buffer and
| restore position - make a simple transient for command dispatch
|
| I'd start with doom-emacs and if you feel your config is too
| cumbersome, you could move to a custom setup with elpaca and
| evil. Doom is good enough for most people and has config for most
| languages. The leader bindings in doom are pretty decent, SPC f f
| is much more preferable to <esc>:e.
|
| Making your own transient menu will be very helpful if you're
| planning on picking up Emacs IMO.
|
| If you need something that works _everywhere_ , then unless
| you're okay with the default settings you're going to have to lug
| your config around with you. Evil can be installed through
| package-install trivially, so that's not an issue.
| DonHopkins wrote:
| Interview with an Emacs Enthusiast in 2023 [Colorized]:
|
| https://www.youtube.com/watch?v=urcL86UpqZc
|
| Interview with a GNU/Linux user - Partition 1:
|
| https://www.youtube.com/watch?v=lE4UXdJSJM4
|
| Deldo - Vibration Control and Teledildonics Mode for Emacs:
|
| https://www.youtube.com/watch?v=D1sXuHnf_lo
| binary132 wrote:
| I think the only way to learn it is long, slow practice. There's
| a how-to linked on the splash page and an extensive wiki, but
| otherwise it's just going to be a process.
|
| I personally love Emacs and have lost interest in learning
| anything else, but "fun" isn't the right word for the learning
| curve. "Pain" might be closer to the mark.
___________________________________________________________________
(page generated 2024-04-27 23:00 UTC)