Live data from Hacker News

Joining the Church of Emacs

fuzzypixelz.com

41–50 of 67 posts

Re: Joining the Church of Emacs

#41
post #35
post #30

Earlier quoted context omitted.

Is all about muscular memory, so you need to repeat and repeat, and take your time to develop it. Is normal not to grasp it after a few hours using the program. Nobody expects taking one karate class and exit being a master of katas. First emacs kata should include this very simple concepts 1.Opening a file (the easy way) -> extra simple. Type "emacs /path/to/my-file" in a terminal. If a file with this name does not…

Yes, except the keystroke to "close a file" is C-x k (for kill buffer). Like you said, muscle memory. It's not surprising that you didn't remember the exact name of the keystroke because normally, you just do it.

This is also related to one of those sharp edges of Emacs that can cut you. "C-x c" is pretty close to "C-x C-c", which is the shortcut to exit Emacs. If for some reason, you DID mean to type "C-x c", it's easy to let your Ctrl finger linger a little too long and hit "C-x C-c" instead. And since x and c are next to each other on a US keyboard, it's also very easy (for me) to hit x and c at the same time with a single finger motion. The odds go up since so many actions start with "C-x"

(setq confirm-kill-emacs 'y-or-n-p) is one of the most important configs to start with, IMO. Or if you don't want to learn/use elisp, the equivalent Customize setting:

Options > Customize Emacs > Top-Level Customization Groups > Convenience > Confirm Kill Emacs

Re: Joining the Church of Emacs

#42
post #40
post #20

Earlier quoted context omitted.

You can pass git blame -w to ignore whitespace changes, though yes, in general it is annoying.

I wouldn't have made this comment if I knew that. Though I suppose this is still an annoyance for git web interfaces. Thanks for the info!

On GitHub you can add ?w=1 to diff URLs to get the same thing (there's a button for it too?)

Re: Joining the Church of Emacs

#43

I never got into the eMacs cult. Been always a vim/vi guy. To me, using eMacs is like people in the cult of lisp: “Why isn’t lisp running the world?” (While the code in Java 8 every day) I get it, a few friends of mine actually use eMacs and we remain friends. But bruh, I’m a CLI guy and I like Vim. It’s literally everywhere. Even on my all powerful Mac M1 laptop I still use Vim. No not Mac vim, not Visual Code, not…

> eMacs

"emacs"

Re: Joining the Church of Emacs

#44
post #8

used to use emacs (with spacemacs then doom) a while back. turned out i don't really care what kind of editor i use as long as it has modal editing mode and doesn't get in my way of editing text. for terminal, i enjoy neither eshell nor any other integrated term. perhaps i just am not that motivated to have a one-editor-to-rule-them-all kind of software.

> as long as it has modal editing

That's what Henry Ford could say.

Re: Joining the Church of Emacs

#45
post #33

Just wondering is there a way to record macros (similar to vim) and replay them really quickly. I often use this to do batch processing for files, and evil is really slow due to slow rendering after each macro operation.

There's a painfully simple answer to this. Use evil-mode, and then just make your macro exactly as you would in vim. You can have the best of both worlds and it mystifies me when not everyone does this. (No accounting for taste etc.) Imagine everyone around you argued about it was better to wear socks or to wear shoes, and you just have to wonder why they don't try doing both at once? Now I wonder if there are people…

But are you wearing shoes and socks or shoes + socks? [1]

1. https://media.gq.com/photos/55828bdde52bc4b477a97e03/master/...

Re: Joining the Church of Emacs

#46

I never got into the eMacs cult. Been always a vim/vi guy. To me, using eMacs is like people in the cult of lisp: “Why isn’t lisp running the world?” (While the code in Java 8 every day) I get it, a few friends of mine actually use eMacs and we remain friends. But bruh, I’m a CLI guy and I like Vim. It’s literally everywhere. Even on my all powerful Mac M1 laptop I still use Vim. No not Mac vim, not Visual Code, not…

This is like a Scientologist criticizing Jehovahs Witness :) Okay, since this is HN and not Reddit let me make this post a bit more useful: has anyone tried "mg"? It is an openbsd (?) project that is similar to Emacs on a first glance but even lighter than barebone vim. It is what I use for remote editing instead of vi and nano. https://man.openbsd.org/OpenBSD-current/man1/mg.1

How does mg compare with MicroEMACS (famously used by Linus Torvalds [1])?

[1] https://www.tag1consulting.com/blog/interview-linus-torvalds...

Re: Joining the Church of Emacs

#47
post #30
post #23

With all the devotion on display from so many very clever people, it's hard not to be at least a little curious about Emacs. But I still have something holding me back. On the one hand, the entire environment that I've heard described might be very powerful. But at the same time, it is a whole new system to learn and get into, very specific to itself, on top of the operating system I'm already using. People say you w…

Is all about muscular memory, so you need to repeat and repeat, and take your time to develop it. Is normal not to grasp it after a few hours using the program. Nobody expects taking one karate class and exit being a master of katas. First emacs kata should include this very simple concepts 1.Opening a file (the easy way) -> extra simple. Type "emacs /path/to/my-file" in a terminal. If a file with this name does not…

This is exactly how I learned Vim. Afterwards I bundled it all together into a book (shameless self promotion I know)

The book is a weekly practice schedule that takes ten minutes a day to build up muscle memory for variety of techniques on premade files. It starts with the absolute basics, but builds all the way to advanced regular expressions with lookahead and lookbehind. By the end it covers the management and editing of marks, registers and macros.

It's amazing what a difference it makes to have muscle memory with macros and registers. Of course one can devise their own katas from the docs, but I just did the legwork of manufacturing scenarios to practice them.

https://leanpub.com/deliberatevim

Re: Joining the Church of Emacs

#48
post #28

I’ve always been a vi/vim guy, it’s not a religious thing, it’s just a decently powerful editor available on most servers I managed to kind of get my head around enough to be productive. I find the weird holy war between the two strange and kind of a turn off.

I tend to think Vim is the best editor, and Emacs is the best OS. So I use Vim inside Emacs with Evil mode.

Re: Joining the Church of Emacs

#49
post #28

I’ve always been a vi/vim guy, it’s not a religious thing, it’s just a decently powerful editor available on most servers I managed to kind of get my head around enough to be productive. I find the weird holy war between the two strange and kind of a turn off.

I get the feeling a lot of vi/vim users are folks who do sysadmin (whatever fun title that has this year) and vi/vim are installed on the box by default. You don't need a very deep knowledge of vi/vim to be productive. Its basically single page cheat-sheet to be productive enough for a lot of jobs, and it works ok over a low bandwidth connection.

I discovered GNU Emacs while at secondary school. Started out running it under OS/2 (using EMX), later switched to Linux. I spent countless hours studying in awe it’s gazillion features (and that was 25+ years ago now, the features have only multipled since.) It seemed more like a work of art than a kitchen sink. But I didn’t really use it in anger for much, because I didn’t have much to actually use it for.

Never got into vi, it seemed weak and unfriendly - until I got my first real job. I was primarily a developer, but did a bit of sysadmin on the side, and hung out with the sysadmins a lot. And all the Solaris boxes had vi, and trying to get emacs installed was too much work. And I became quite good friends with one of the sysadmins in particular, who was a big vim fan.

20 years later, I use MacVIM every day. And on the rare occasion I start emacs, I’m struggling to remember how to do anything.

Re: Joining the Church of Emacs

#50
post #23

With all the devotion on display from so many very clever people, it's hard not to be at least a little curious about Emacs. But I still have something holding me back. On the one hand, the entire environment that I've heard described might be very powerful. But at the same time, it is a whole new system to learn and get into, very specific to itself, on top of the operating system I'm already using. People say you w…

> But at the same time, it is a whole new system to learn and get into, very specific to itself

If you already know Vim keybindings, it is very easy to get into Emacs with evil-mode.[1]

Besides that, Emacs by default comes with a menu system that helps you discover keybindings, too. And there is also cua-mode which I haven’t tried.[2]

[1] https://github.com/emacs-evil/evil

[2] https://www.emacswiki.org/emacs/CuaMode

Post reply on HN