Live data from Hacker News

Fine, I'll build my own text editor

dbushell.com

271–274 of 274 posts

Re: Fine, I'll build my own text editor

#271
post #14
post #3

I am being pushed to use vs code right now by my team, but we already have a fully programmable and scriptable editor called emacs that is 100000x better. I don't understand why everyone just switches to these random tools. Text editing is a solved problem. Most of the supposed advantages of these tools is just a configuration of vim or emacs.

If you work on web tech (and who doesn’t these days?) VS Code has the advantage of using the same tech stack you’re already familiar with. If you need to debug a problem, just open devtools. If you want to run a performance profile, do the same. If you want to fix a bug in the extension you’re using, just open a PR and fix it. It is a very flexible system and still quite fast and easy to configure. I’ve been trying Z…

> But I don’t think it is meaningfully slower in practice

It's all relative and perceptional, no? It really irks me that when you grab a freshly installed VSCode and install just a single extension for vim-support, there comes a palpable typing latency. Just like that. I currently use about 300 packages in Emacs. I can't ever imagine even attempting half of this number of extensions in VSCode. Would it even start?

Re: Fine, I'll build my own text editor

#272

Earlier quoted context omitted.

> We live in wild times. I hope everyone is taking advantage while they can. Yep, I'm taking advantage of the times by using the exact same tools I have been for years, and if those fail me, I'll pay for one of the multitude of other high quality editors offered by companies who's business it is to make them, so I get back to writing things in them instead of paying even more to companies trying to persuade me to bel…

No shade on keeping using what is working. I was moving from Windows to Linux Fedora so I was in the market for a new editor. VSCode just wasn't working for me any more. I considered a bunch of options, including vim or neovim or lazyvim, emacs, newer projects like zed. LLM gave a few more I can't recall including helix and Kate. There are so many good options these days, we're all spoiled for choice. But the main th…

> I'm mostly reading/searching/navigating

I think you need someone sufficiently experienced to give you the tour of what's possible in Emacs. Search is what sold it to me and I have never seen anything close to that in any type of software I ever used, and I've been programming for a long time - decades.

When someone showed me just a few ways of performing different kinds of search tasks in Emacs, it blew my mind. Wait a minute. You can search by grouping categorically, with regexp, with sparse-trees, sorted - by recency, alphanumerically, contextually; narrowed, expanded, in a grid-view, in a list, incrementally as you type; forward, backward, wrapped; fuzzy; by out-of-order separator tokens; by scope; by structure; by history; by class; by tree-sitter node shapes; in your browser history, in Google, Wikipedia, GitHub, YouTube, etc. etc.?

And because Emacs is insanely text-oriented it fits amazingly to use with LLMs. Just look at the number of different packages people keep building in it¹. You can query a model anytime, anywhere, I'd be typing some text (like this very comment for example) and then I can start chatting with an agent right there, in the same buffer - e.g. for fact-checking my assumptions. Then I can collapse the irrelevant points and focus on the substance, I can peek into the collapsed sessions individually, or I can open them in an indirect-buffer and start chatting on some specific point there.

In my coding assistant buffer, while typing a prompt, I can use a different model, with different parameters, within the same or different context to adjust the prompt itself. Then I can compare the rewrite changes on the spot - using different methods - line-based or three-way-merge diff, etc.

Or even wilder scenario - I'd be reading some article in a foreign language, I get automatic translation popup for every word, paragraph or selected region - all "smart", all based on where the cursor position is. Then, if I'm confused about a word, I can bring wiktionary² or definition lookup buffer. Guess what? I can start chatting with an agent in that same buffer asking it I dunno, if there's an Arabic influence on the word or whatever.

Because the agents have introspective capabilities, they can easily reach to other buffers, multiple agents working in parallel can empirically analyze the state of things, you basically get orchestration pretty much for free - it's just a matter of building proper skills.

I don't know what and how you evaluated things, but no other harness tool I've seen in the wild has reached the point of flexibility and malleability level of it. Emacs remains uncontested king of all sorts of text manipulation. It's not an editor, it's entirely something else.

¹ https://www.reddit.com/r/emacs/comments/1uwm3c0/the_state_of...

² https://github.com/agzam/wiktionary-bro.el

Re: Fine, I'll build my own text editor

#273

I never understood why people have an issue with VS Code

> why people have an issue with VS Code

Indeed. Why people had any beef with:

- Borland Turbo Pascal, Turbo C, Turbo C++, Turbo Assembler, Borland JBuilder

- Visual Basic IDE, Visual SourceSafe, FrontPage

- Dreamweaver, Brackets, TextMate, JetBrains Fleet, etc.

It's totally okay to spend years investing in some proprietary editor, IDE, tool, whatever. Just learn how to learn them quickly and learn how to dump that knowledge with no regrets. Never develop muscle memory, never learn keyboard shortcuts, never build extensions. Who cares if you're using it efficiently or as if you just woke up to it this morning? By the time you try to get comfortable in any tool, it may vanish into obscurity or become something else.

Do not, I implore you, do not learn Emacs or Vim. They both predate every product on this list and will outlast everything on it. You may eventually get comfortable and even start liking your job. Surely, you don't want to start getting paid for having fun?

Re: Fine, I'll build my own text editor

#274
post #183
post #170

Earlier quoted context omitted.

There is just an insane amount of engineering and work you have to do. Measuring text and shaping fonts is a nightmare, computing chart atlases, having infinite scroll with virtual lines coming to and out of the screen, all the strange data structures to preserve optimized decoration rendering, ropes and ropes (hard data structures), navigating with the keyboard, computing which character interaction is closer to the…

I think you are over estimating it. Sure unicode support is a hell hole. But if you stick to ascii, it is not very hard, that is including syntax highlighting. virtual lines ....I don't know about CRDT or atomic editing though...

Yeah maybe, but I still think even a little terminal editor is very beautiful.

On CRDT, or Atomic Editing, If you're interesting reading the blogs of Zed, VS Code, and the archives of Atom are very interesting.

Post reply on HN