Joining the Church of Emacs
fuzzypixelz.com
fuzzypixelz.com
1. Having a need for something where Emacs is one of the best. E.g. outline folding, git gui, etc.
2. learning the basic shortcuts and concepts; doing the basic config to remove any problems
3. deep customization and creation.
If you don't have the need (#1), I wouldn't worry about it. If you do and you try it out, I agree #2 can be a little discouraging, but not too much. You can also usually make it easier by learning only the concepts and then using the gui menus to navigate. You can skip #3, or at least delay it. At this point, it's still just a tool like most others, and that's fine. I think #3 is what you're thinking of. That's what tends to get written and blogged about.
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 exist in the directory, a file image in memory will be created for it.
2.Do something with the file. Edit the file, see the image, read the pdf that you opened or take a look to the pdf code. Just use the keyboard and type something.
3.Close your file. Type Control and X at the same time. Then type C (for close): "ctrl-x c"
> "Your buffer (image in memory of the file) has been modified. Do you want to save the changes?"
Not: type N.
Yes: type Y.
Take in mind that if you open an extant file and type N, the old file will not be modified (you have still a file with this name).
But if you open a new file and type N, the image in memory will be discarded without a trace. Don't look for an empty file with that name in your directory. Will materialize only after you save it once. You can save an empty file.
Congratulations you are using emacs now. Here is your white belt.
Any time invested on using the program will payback later generously
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.
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.
(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
Hum, I see. I stand corrected. It seems that all this time I was typing Ctl-x Ctl-C instead. I never use copy in emacs
With org mode, everything is plain text. This should go a long way to easing your worries about getting stuck in a groove. Lots of folks take notes in markdown. It's the same kind of thing.
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]
> I don't like the idea of digging myself into a groove, even if it should be a comfy one. Powerful ecosystems can be hard to break out of, something I've found with Google and specific social media.
I had the exactly same thought holding me back, then I realized that Emacs doesn't really suffer from vendor lock-in/the walled garden effect: it's way older than most gardens, and bound to be around for as long as we use keyboards to interact with computers.
Come over to the Emacs side, frodetb, we have lambdas.
For example I have been using emacs for more than 20 years and only recently I got into the habit of actually running shells from inside it (it is very convenient, but just opening another terminal is an habit that is very hard to shake).
But much like Linux itself was in the Windows 9x era, it is a gravity well for your attention, and you will want to do more and more with it if you can.
I think a lot of the myth-making around the power and the cleverness of long time emacs wizards paradoxically achieves exactly what happened to you, it makes Emacs seem more intimidating than it is. Also true for a lot of programming languages with that reputation.
Is emacs old, has weird keybindings and weird UI paradigms? Yes, but it's also just a piece of software and there's nothing in the way of learning it. It calls itself the self-documenting text editor for a reason, it has plenty of learning tools deliberately built in. Despite its reputation, from language support to help there's very few pieces of software that have put that much emphasis on being accessible.
You can still use other software, don't need to go all-in, etc, but I'd always recommend everyone to give it at least a shot.
And in a way that's how I use vi, I'm emacs mostly but I play with vi regularly, I stay at the no-plugin level enjoy keyboard golfing :)
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.
one = 1
fortyTwo = 42
elite = 1337
is exactly how most modern linters want to format my code.For example,
one = 1
fortyTwo = 42
elite = 1337
might become: one = 1
ultimateAnswer = 42
leet = 1337
This made me stop column-aligning in most cases. An exception is array initializers for two-dimensional tables with many columns, where the benefit is important enough.I wrote the article [1] linked in the post, so that was really fun to see as well!
Tldr: simplicity, extensibility, kakoune grammar, less modifier usage, dvorak/keyboard compatibility, great multiedit system that obsoletes macros in daily usage
(Disclaimer, i work on meow)
That's what Henry Ford could say.
This is one of the feature that I miss the most when I'm using another editor. So much that I spent some time this summer implementing keyboard macros in Kate, which is also a very nice text editor :). See https://news.ycombinator.com/item?id=32585221
You can also pass C-x e a 0-prefix argument (M-0 C-x e) and it will repeat the macro until the bell rings, which usually happens when a movement command like forward-line, forward-sexp, etc. reaches the end of a buffer.
Another strategy is to record a macro that only operates on a single line, then mark the region you want to repeat it in for every line and then execute it on all these lines using C-x C-k r.
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 who use Emacs controls in vim and wear their socks outside their shoes.
1. https://media.gq.com/photos/55828bdde52bc4b477a97e03/master/...
But once you start mixing reallyLongVariableNamesLikeThisOne and shortOnes, the distance between the short variable name and the value is long enough that there's a chance I'll look at the wrong value or something.
I'm glad that automated formatters/linters pretty much all remove/complain about that stuff now days.
one = 1
fortyTwo = 42
elite = 1337
To answer your question, I tend to agree that it gets harder to read the wider the horizontal spacing is, unless the relation between the values in the same column is very important.This layout falls apart when there is an error and the readout is a disaster, but it just goes to show: there is no perfect answer.
So I sigh and run the formatter on the code.
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 NeoVim or some other bastardized version of Vim.
Just Vim. Or vi.
And my .vimrc is on all the computers and servers I use. No plugins.
To each his own. Right?
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.
[1] https://www.tag1consulting.com/blog/interview-linus-torvalds...
Nano drives me up the wall.
"emacs"
(Fond memories of that computer!)