Live data from Hacker News

Use GNU Emacs

www2.lib.uchicago.edu

211–220 of 301 posts

Re: Use GNU Emacs

#211
Many good comments in this thread. I'll just leave a note of my experience and opinion.

I've used vim since about the year 2000. Before having access to a computer running a Unix, I'd read books about the Unix environment and fell a little in love with ed commands. Their power, yes, but also the immediacy of the user experience. It's just there, all the time, in vi.

Having coded a decent amount of vimscript... Eh. vim is not great (I'll likely never switch to neovim either.) Perhaps the best part about vim is the manual. There are so many features, some of which depend on/affect other features in various ways. I use vim for taking freeform notes, transcribing long form texts mostly - the auto formatting that can hard wrap at textwidth, without any extra command or keypress to trigger the formatting) is a feature I use a lot. The ability to quickly pipe text through Unix filters (mostly `par' in my case) is also great.

All this is easily done in emacs too, but I feel there's more immediacy in vi (and vimscript).

I salivate at the better unicode support in emacs, and the ability to have frames - separate GUI windows of the same emacs process. I would use these all the time. (g)vim likely won't get better in these areas within my lifetime.

Availability on mobile devices: I use an iPhone - it's from work, I have it with me all the time. I do not want to carry along any other device. A recent-enough version of vim is available in the AppStore as iVim. This has become the only note-taking app I can bear to use. It can write to text files on iCloud and access them later from other devices.

On vi clones - I wish Thomas Dickey's editor (vile) had become popular, instead of vim. Proper lexing and parsing for syntax highlighting (instead of regexp soup) - Imagine! I started out on computing with Red Hat Linux, where vim was installed by default - and most documentation, online resources, might have mentioned vim instead of any other clone, leading to vim gaining mindshare.

Re: Use GNU Emacs

#212
post #37

I’ve been using Emacs for ~15 years right now, but I don’t recommend it for the last few. I love it, it’s great, and as many others, I tried to move out of it but there was something I couldn’t do I KNEW I could get in Emacs and it frustrated me so much I kept going back. But I don’t think it brings a lot of added value. There are many very very powerful IDEs and editors which offer out of the box great UX and featur…

I've been using Emacs for 25 years, and I use a stock install and I never even touch the .emacs file. It's just a text editor. For many tasks it has better usability than the competition. This is why I use it. (Not for everything, though, and that's okay.) I'd guess most people are like me. Configuring text editors is not our hobby.

I'm in this camp.

My first, very brief, foray into Emacs was at the suggestion of a friend back in, oh, '91-92. He raved about the buffers and the shell windows. Well, I couldn't run my 4GL programs in the shell windows, since they were full screen programs, and the terminal emulation wasn't working. So, I just stopped and went back to what I was doing.

This turned out to be a blessing in disguise. For this what the heart of the UNIX explosion. Everybody and their mother had some new box running some sort of UNIX, and we were installing software on all of them. While I spent my day in SCO on 486/66 (Shared by 8 other people), we were installing on Suns, IBM, NCRs, DG, Sequent, HP, and probably something else. I was always on someone else machine.

vi, of course, was everywhere. Not so much Emacs. I was also working in their environments, not mine, so box stock was the norm. And at the time, vi was more than suitable and capable. I still use vi pretty much the same way. Today I have multiple windows, unlike back then, but beyond that those formative years were so ingrained, those patterns and habits stick to this day. vi doesn't need plugins, it has bang-pipe. My file systems (notably tmp) are littered with x.x, y.y, z.z, etc. files adding as ad hoc cut and paste buffers. If I couldn't do the work with bang-pipe, shell out, bonk on some data in /tmp/x.x, pop back into vi and :r /tmp/x.x. Is it a single keystroke? No. But it's not in vi either. yyp is about as short as you can get.

Later, as I moved into Java and Python, I started adopting Emacs. I was particularly attracted to its auto formatting support for Java. Later on I chose Ant (Java build tool) because is had a -emacs switch to make the output compatible with emacs so I could jump to compiler errors. But that's stock behavior in emacs, we get that "for free", Ant conformed to emacs, vs the other way around.

I still kept my vi habits in emacs. If I wanted to refactor something, I was more apt to do something like vi `find . -name "*.java" | xargs grep methodToRename` than use emacs. I had multiple windows, so this was simple to do. Since Java is strictly typed, it coped well with yelling at my ham fisted endeavors when I went stomping through the code base.

I finally moved to an IDE, NetBeans, around NB 5 or so. Auto complete spoiled me.

Today my use of Emacs is mostly only for Lisp, and even then my Nerd Cred isn't up to par. I don't use Slime. I use emacs for lisp almost solely for auto indent, and paren matching. vi's lisp indent isn't spectacular, but emacs' is pretty good. The paren matching is about par, it doesn't bother me to use % in vi to test parens, but emacs is better. Then, I just ^S, and reload the file in my REPL.

I've tried Slime, but simply I don't do enough Lisp to make it worthwhile. It doesn't stick, so I have to relearn it when I come back. Just not worth the bother. I just want to work and get stuff done, not fight tools. Emacs on the Mac works well enough out of the box for me. Scroll wheel scrolls, Cmd-XCV cuts/copies/pastes, I can mouse around and double click things. You know, text editor. I also like messing with elisp in the scratch buffer. Even an old guy like me can remember ^J.

Basically what I've learned in my computing career, having to jump around every place, there's one commonality that's at every location I visit. Me. Rather than relying on adapted environments, I rely on an adaptable me. I like tools, I use tools, but I pick tools that work well out of the box. I want a tool, not a kit. Unix, thankfully, comes with a base set that I learned a long time ago. The important ones (important to me) have stuck with me. I can awk all day long, but I can't even spell 'perl', and it's my go to shotgun if I need it.

Re: Use GNU Emacs

#213

I can't ever imagine switching from vi at this point. It's what I know and matches the unix philosophy of do one thing and do it well. I can easily run shell commands as I need to without it interrupting my work flow. Why would I switch to something that does everything and has an entirely different workflow? If emacs works for people, good for them, but it isn't for everybody.

Which is totally fair. I kind of despise the Emacs vs Vi(m) flamewars. I like them both. If I don't want to launch a several hundred megabyte program to edit a quick config or something, I'll launch any of Micro, Neovim, or Helix (yes, I like to experiment - side note, I recommend Helix a lot) and that does the job more than adequately. But if I want to work on a big project, take notes, write a blog post or article or document, track todos, check RSS feeds... I personally prefer Emacs.

Re: Use GNU Emacs

#214
post #41
post #3

The Ingebrigtsen quote is meaningful. One should think of "using Emacs" not like "using Vim" but like "using the JVM." Emacs is a powerful platform for building hackable, command-and-ui driven applications. You may not like the text editor that ships with a default Emacs install, but you don't have to use it! There are others (e.g. evil.) There are also other applications. Some of my favourites are - calc (desktop RP…

I recommend calc, I fell in love with RPN and can’t use normal calculators anymore. Never heard about sunrise commander though.

Same here. I knew about RPN before Calc, and knew there were calculators that used it, but it seemed bizarre to me. Once I started using Emacs, I decided to see what Calc was all about, and finally realized how slick it feels. It's really cool to need to do some math while coding or writing, hit a quick keybind, and have a full-fledged calculator right in my editor.

And the cool part is you can do things algebraically, too. Even solve for variables. Really crazy program.

Re: Use GNU Emacs

#215
post #165

I used Emacs for a while and now I use Intellij. Now I don't understand the appeal of customizing the editor to such degree. I'm not that unique. I just want stuff that works. Give me the same setup as everyone else so that when issues arise everyone will push for them to get fixed and everyone can help each other.

I started using Emacs because it could actually run on my cheap netbook, and continued because I'm addicted to Magit and Tramp plus I can't retrain my window management muscle memory. Tinkering with it came naturally over the years in tiny increments, the same way VSCode users change a setting or install a plugin. The emacs.d folder is a git repo that follows me from system to system. Customising it isn't a selling p…

It still does use a lot of memory, but thankfully most systems have that to spare, and CPU usage is much more optimal now thanks to native compilation.

Re: Use GNU Emacs

#216
post #163
post #71

Earlier quoted context omitted.

I switched from VSCode to Doom Emacs with very little of my own customization (doing TS, Scala, Rust mostly) a few years ago. There is not one thing of VSCode that I miss, and I enjoy some of the most powerful features like wgrep & all, and a great vim emulation layer (the one I had in VSCode sucked).

Since reading your comment, I have gotten very excited about Doom Emacs in the last 45 minutes. But, now I realize this is a very powerful configuration of Emacs if and only if you prefer using the VI keybindings. It looks like spacemacs is that as well. I actually enjoy Emacs keybindings, and would like to find something as polished and supported as Doom, but without using VI keybindings. Does anyone know where I sh…

Spacemacs on initial start-up, it will prompt you to choose either evil mode (vi) or holy mode (standard emacs) keybindings. Before I went to vanilla emacs, I was a spacemacs user using the 'holy mode.'

Re: Use GNU Emacs

#217
post #80
post #46

Earlier quoted context omitted.

i get that, though i would rather compare it with chopsticks than vinyl records. you use emacs to do stuff, you dont just listen to/watch it do its thing. chopsticks might not seem like a good metaphor at first glance, as they are much more simple, but they are highly compatible with a lot of tasks and can be utilized in many ways that a fork, spoon, spork or colander just wouldnt handle as well. to my mind, the simp…

As a westerner, chopsticks are much better than spoons or forks at getting that last grain of rice in the plate, or a small piece of salad.

Or eating vegetables like sauteed kale, or string beans.

I will admit that for that very last teaspoon full of rice, though... I grab a spoon.

Re: Use GNU Emacs

#218

I'm more of a vim guy, but "I get it". I started using these "serious" editors back in college and eventually settled with vim over emacs. I don't wanna get into the whole editor wars - it's like picking a Pokemon at the start of the game. I went through the whole phase of adding a bunch of plugins, custom macros and have a huge .vimrc file that, once in a while, would break if I was using the wrong vim variant {vi,…

> it's like picking a Pokemon at the start of the game

I haven't heard that before, but I feel like that's the best way to decribe it.

~~emacs~~ water type pokemon are the best clearly.

Re: Use GNU Emacs

#219
post #163
post #71

Earlier quoted context omitted.

I switched from VSCode to Doom Emacs with very little of my own customization (doing TS, Scala, Rust mostly) a few years ago. There is not one thing of VSCode that I miss, and I enjoy some of the most powerful features like wgrep & all, and a great vim emulation layer (the one I had in VSCode sucked).

Since reading your comment, I have gotten very excited about Doom Emacs in the last 45 minutes. But, now I realize this is a very powerful configuration of Emacs if and only if you prefer using the VI keybindings. It looks like spacemacs is that as well. I actually enjoy Emacs keybindings, and would like to find something as polished and supported as Doom, but without using VI keybindings. Does anyone know where I sh…

[deleted]

Re: Use GNU Emacs

#220
post #163
post #71

Earlier quoted context omitted.

I switched from VSCode to Doom Emacs with very little of my own customization (doing TS, Scala, Rust mostly) a few years ago. There is not one thing of VSCode that I miss, and I enjoy some of the most powerful features like wgrep & all, and a great vim emulation layer (the one I had in VSCode sucked).

Since reading your comment, I have gotten very excited about Doom Emacs in the last 45 minutes. But, now I realize this is a very powerful configuration of Emacs if and only if you prefer using the VI keybindings. It looks like spacemacs is that as well. I actually enjoy Emacs keybindings, and would like to find something as polished and supported as Doom, but without using VI keybindings. Does anyone know where I sh…

As mentioned, you can disable evil mode in spacemacs or doom.

There's also prelude which doesn't include evil by default. Not quite as fully featured as doom/spacemacs, but it's a good place to start.

All that said, you could just set it up from scratch. Now that lsp-mode and dap-mode are things, you can setup a fully featured IDE in not very much config at all. I have everything in my init.el and setting up projectile, lsp-mode and dap-mode which is like 85% of what you need for a fully featured IDE. That bit is only about 30 lines of config. Throw in flycheck, company-mode, hydra for keybindings. maybe treemacs for a project view.. a few hundred other lines to make it not all look like trash....

On second thought, it's kind of a pain in the ass. Just use clion or vscode or something.

Post reply on HN