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 will want to do everything in Emacs, and hold that idea up as a good thing, but I tend to be scared away instead. 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.
In my experience, this is one possible path for getting "into" Emacs:
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.
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 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
I learned the basics for org mode. I invested a bit of time to learn one small corner of the default emacs ecosystem, and every second was worth it. Since then, I've continued to explore its use as a text editor (and it keeps getting better and better). There's a bit of a learning curve for just the basics, and it's understandable that you don't want to deal with that. Just the basics can go a long way with org mode, though.
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.
> 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.
You do not have to doeverything in emacs. At the end of the day it is a tool and it should make your life easier. Do in it only the bits that actually help you, if any. With time you might do more and more stuff. Or not, that's fine.
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).
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.
Still, with emacs, it's open source and runs almost anywhere. If you happen to LIKE that grove, you can be confident that you can bring it along wherever you go.
I think the idea that learning emacs will suck all your brain power is a bit false. You can really just use it on the side from time to time and get a feel about it without investing much. It is a large (40+ years show) system, that even old users don't know fully ..
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 :)
I have accomplished things in my life that literally would not have happened without it. Before org mode I had never been able to find a task management workflow that kept me particularly productive. Just the basic outline features of org mode (with the list functionality to spice things up) has allowed me to comfortably know I'm on top of the important tasks in my life. I'm learning more about TODOs, priorities, the agenda, etc., and it keeps getting better and better.
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 don’t think anyone actually thinks it’s anything other than a joke. Hell, many Emacs users use a very complete Vim emulation package called Evil. In fact, the two most popular “pre-configured setups” are designed around Vim keys.
After decades of using VIM, then NeoVim, I now use Emacs with Evil. The old joke that Emacs is a terrific OS but missing a decent text editor is truer today more than ever.
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.
Sigh, I am an alte kaker in the Temple of Emacs and what that has meant is early on I learned how to make a keyboard macro, and because of that I've never really memorized how to awk or sed. This has been a problem: I have to keep seeking out the info on awk and sed syntax.
In IDEs that support refactor-renaming (Emacs probably does?), the column-aligned formatting also has the drawback that it breaks (unless the refactoring also auto-realigns all affected 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.
Really glad to see more people switching to meow[0]. It felt extremely right after using and being frustrated by both standard emacs and evil.
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
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.
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.
Yes you can do that in Emacs of course. Default key bindings are "C-x (" to start recording, "C-x )" to stop, and "C-x e" to play the macro — and then you can just press "e" to repeat it again and again.
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
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 who use Emacs controls in vim and wear their socks outside their shoes.
What scares me is trying to set up Emacs on Windows. I use Mac at home, iDevices everywhere, and Windows at work. I've heard too many stories about poor performance on Windows, as well as perceived difficulties (at least on my part) getting emacs and emacserver and all that set up on Windows. I want to like it; I just don't have the time or energy.
His alignment formatting example is harder for me to read than what he started with. I have an eye tracking issue so I'm not always the best person to judge this. Is it harder for everyone else?
Just to confirm that there are people who agree with the author: this tidbit actually kept me reading the article! It was the new eMacs thing I learned today. I thought it was much easier to read after aligning. As long as things stay within a reasonable width, that brand of consistency (read “columns”) makes it easier for me to read.
I also dislike that style, I appreciate it looks nicer, but I definitely find it harder to process/read. That example isn't that bad, because all the variable names are pretty close to the same length.
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.
I was a bit surprised that the numbers didn’t get right-aligned:
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 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.
[+] [-] frodetb|3 years ago|reply
[+] [-] jrootabega|3 years ago|reply
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.
[+] [-] pvaldes|3 years ago|reply
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
[+] [-] comfypotato|3 years ago|reply
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.
[+] [-] nequo|3 years ago|reply
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
[+] [-] MonkeyClub|3 years ago|reply
> 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.
[+] [-] gpderetta|3 years ago|reply
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).
[+] [-] Barrin92|3 years ago|reply
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.
[+] [-] eschneider|3 years ago|reply
[+] [-] agumonkey|3 years ago|reply
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 :)
[+] [-] olivierestsage|3 years ago|reply
[+] [-] comfypotato|3 years ago|reply
[+] [-] donatj|3 years ago|reply
[+] [-] JHonaker|3 years ago|reply
[+] [-] dotancohen|3 years ago|reply
[+] [-] protomyth|3 years ago|reply
[+] [-] JackMorgan|3 years ago|reply
[+] [-] Ferret7446|3 years ago|reply
[+] [-] jerrya|3 years ago|reply
[+] [-] patrick451|3 years ago|reply
[+] [-] layer8|3 years ago|reply
For example,
might become: 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.[+] [-] kartoshechka|3 years ago|reply
[+] [-] esrh|3 years ago|reply
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)
[0] https://github.com/meow-edit/meow
[1] https://esrh.me/posts/2021-12-18-switching-to-meow.html
[+] [-] lemper|3 years ago|reply
[+] [-] Koshkin|3 years ago|reply
That's what Henry Ford could say.
[+] [-] pca006132|3 years ago|reply
[+] [-] p4bl0|3 years ago|reply
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
[+] [-] Y_Y|3 years ago|reply
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.
[+] [-] alexott|3 years ago|reply
[+] [-] themadturk|3 years ago|reply
[+] [-] ohCh6zos|3 years ago|reply
[+] [-] comfypotato|3 years ago|reply
[+] [-] doix|3 years ago|reply
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.
[+] [-] layer8|3 years ago|reply
[+] [-] joeman1000|3 years ago|reply
[+] [-] smitty1e|3 years ago|reply
[+] [-] Lapsa|3 years ago|reply
[+] [-] eric4smith|3 years ago|reply
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?
[+] [-] kramerger|3 years ago|reply
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
[+] [-] Narishma|3 years ago|reply
[+] [-] michaelcampbell|3 years ago|reply
"emacs"