Live data from Hacker News

916 Days of Emacs

sqrtminusone.xyz

201–210 of 309 posts

Re: 916 Days of Emacs

#201

Earlier quoted context omitted.

See the \zs and \ze patterns in vim. I've asked for them to be implemented in evil, but have been told it's not possible because evil just uses emacs' regex engine, which can't do this.

I think these are lookahead's in some parlance, Emacs doesn't support them. On the rare occasions I need something like that I just use capture brackets. Suppose I want to delete a contiguous string of 'a' but only if it's followed by the letter 'b', then a+\(b\) → \1 aaaab aa gets you b aa So it works with a simple case. I guess it could get messy if you're doing anything really complex but TBH the above is about as…

A need I've had on multiple occasions is to, for example, search for the next occurance of "abcdef" but have my cursor land on the "d".

In vim that's a simple abc\zsdef

It also highlights just the "def", which is nice.

To highlight just the "de", you could use abc\zsde\zef

Yes, you could probably use some lisp magic to do the same in emacs, but it's not nearly as easy or convenient.

Re: 916 Days of Emacs

#202
post #85

Earlier quoted context omitted.

That's interesting. I've asked Bing Chat and ChatGPT several times to write me elisp code, and not once did it work well. It often invents APIs.

Hm, I've had luck with openai gpt4. I've had it make fake APIs before, but usually when I say "fooFakeApi doesn't exist" it corrects itself.

But how well does it do on elisp?

Re: 916 Days of Emacs

#203

I've been a hardcore vi user pretty much my entire life, but I decided to force myself to spend a year using emacs a while back just to see what all the fuss was about. When the year was over and I "allowed" myself to return to vi, it was like a huge weight lifted off my shoulders... to this day I still don't see what the hype was about. On the plus side, though, I memorized the emacs cursor movement commands, which…

When I was at the university and started programming on UNIX, the professor said we should try both emacs and vi and see which we like better, and provided links to some tutorials. I tried them both and liked vi. Emacs seemed slower. In my undergraduate wisdom, I deemed emacs to be "stupid" and went on with my life using vi. After I had been programming professionally for about ten years, I decided that my harsh judg…

> I noticed that lots of skilled and professional engineers never learned to touch type. That discovery itself was odd to me: why would a professional programmer not want to invest the time to learn to type properly: typing fast boosts your productivity significantly. But they do.

This is a false dilemma. Plenty of us type quickly without hunting and pecking, or looking at the keyboard, without home-row touch typing. This comment was typed as such.

There isn't anything "proper" about home row style touch typing, it is merely one of multiple ways to type fast.

Re: 916 Days of Emacs

#204

282 hours of configuration! If we subtract the weekends from that 916 days, that's an average of about 45 mins a day fiddling with config. I don't even want to spend 45 mins a month fiddling with config. I really don't understand Emacs people.

When I first started using emacs I spent 10 hours a day for many months customizing it.

Re: 916 Days of Emacs

#205

Earlier quoted context omitted.

I think these are lookahead's in some parlance, Emacs doesn't support them. On the rare occasions I need something like that I just use capture brackets. Suppose I want to delete a contiguous string of 'a' but only if it's followed by the letter 'b', then a+\(b\) → \1 aaaab aa gets you b aa So it works with a simple case. I guess it could get messy if you're doing anything really complex but TBH the above is about as…

A need I've had on multiple occasions is to, for example, search for the next occurance of "abcdef" but have my cursor land on the "d". In vim that's a simple abc\zsdef It also highlights just the "def", which is nice. To highlight just the "de", you could use abc\zsde\zef Yes, you could probably use some lisp magic to do the same in emacs, but it's not nearly as easy or convenient.

I guess in the next eight hours somebody will post you a snippet of elisp which will do what you want. Emacs people are very accommodating. Let's see anyway

Re: 916 Days of Emacs

#206
post #176

Why do people still use emacs and vim in this age of VS code and intellij? I’ve heard plenty of arguments, but they kind of suck to be honest. They’re more like rationalizations for why they stick to what they know. I just don’t get it. Why use inferior tools? Both are lighter weight. Big deal, buy a faster computer. It’s nothing compared to your salary. Both may let you type slightly faster and move around faster. M…

I don't think the fact that Vim and Emacs were created a long time ago makes them inferior. They keep developing and they are up to date with many/all programming-features. There are bunch of extensions that VScode just doesn't have despite it's huge extension store. Also the main thing for me about these editors and especially Emacs is that you can program it. Not just configure it but actually program and do anythi…

To be clear, I'm not saying the problem is they were created long ago.

I'm saying (from my pov, which may be wrong) that they don't seem to have as good of an IDE experience. Certainly the out-of-the-box experience with emacs/vim is much worse. And the learning investment is pretty steep. But even if you configure everything as an expert would, the experience still seems lacking to me.

Re: 916 Days of Emacs

#207

Why do people still use emacs and vim in this age of VS code and intellij? I’ve heard plenty of arguments, but they kind of suck to be honest. They’re more like rationalizations for why they stick to what they know. I just don’t get it. Why use inferior tools? Both are lighter weight. Big deal, buy a faster computer. It’s nothing compared to your salary. Both may let you type slightly faster and move around faster. M…

The argument for vi is easily made. UNIX devs are constantly diving in and out of directories, grepping, awking, and otherwise spot checking code at the shell prompt. A terminal-based editor emulsifies coding and such command line activities. The argument for emacs is less easily made, and its dwindling market share evidences that. If you're a black belt in elisp like I am, all other editors seem unusable. But you're…

That's another good argument. Once you've invested the time learning everything about emacs, that's not a barrier to using it anymore, it actually kind of locks you in, since you won't have that level of familiarity in VS code or intellij (and anyway, they're not as friendly to modify.)

Re: 916 Days of Emacs

#208

Earlier quoted context omitted.

Hm, I've had luck with openai gpt4. I've had it make fake APIs before, but usually when I say "fooFakeApi doesn't exist" it corrects itself.

But how well does it do on elisp?

When I've informed it of fake APIs, it apologizes, and replaces it with another fake API.

Re: 916 Days of Emacs

#209

Actually, what's the fuss about Emacs being so good? I'm a hardcore vim user to the point that I've installed Vimium for browsers, use vim on my iPad as well. Someone please enlighten me with links, guides or just a comment as to what's in Emacs that makes it productive and special.

Start with the official Emacs Tour: https://www.gnu.org/software/emacs/tour/

Re: 916 Days of Emacs

#210
post #36

I've used emacs daily for maybe 15 years (and not as daily before that). I think I have a love/hate relationship with it. It's certainly the most customizable editor I can think of, but over time, that can be a burden. And its age means... the APIs are often not very intuitive. The terminology is often a bit strange. I dunno. I can see why folks use VSCode.

I'm in the same boat - I've used it almost daily for 7ish years at this point. It's so much fun to use and customize, but there are easier options out there. When people find out I use Emacs I always caution them against using it. It's taken me a long, long time to be productive in Emacs. VSCode, JetBrains tools, etc. don't have the same requirement and start up time to productivity. Buying into Emacs does give you a…

It does. And the editor design, where almost everything of significance is just a function you can call/advise etc. from user code, makes it the most supple editor on earth. That's why I'm still there. But...

Pretty huge learning curve to adopt it.

Post reply on HN