TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Craft of Text Editing (1999)

244 pointsby youjiuzhifengover 8 years ago

8 comments

cmyrover 8 years ago
I&#x27;ve been learning a lot lately by following along with the development of xi[1], a new text editor written in Rust. Through reading that project&#x27;s RFCs I&#x27;ve then come across other interesting projects, like swiobe[2] and wi[3].<p>What are the other canonical resources on this topic? It feels like tons of the interesting thought is scattered around various blogs and usenet posts and the like. I&#x27;d love to create a nice collection of good writing on text-editing &#x2F; tools, but I&#x27;m not sure where to start.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;xi-editor" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;xi-editor</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;swiboe&#x2F;swiboe" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;swiboe&#x2F;swiboe</a><p>[3] <a href="https:&#x2F;&#x2F;github.com&#x2F;wi-ed&#x2F;wi" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;wi-ed&#x2F;wi</a>
评论 #13520108 未加载
评论 #13518760 未加载
评论 #13518603 未加载
评论 #13522262 未加载
Toddover 8 years ago
A paper that covers some of the data structures used in editors is:<p><a href="https:&#x2F;&#x2F;www.cs.unm.edu&#x2F;~crowley&#x2F;papers&#x2F;sds.pdf" rel="nofollow">https:&#x2F;&#x2F;www.cs.unm.edu&#x2F;~crowley&#x2F;papers&#x2F;sds.pdf</a><p>The gap buffer, in particular, is a great example of a simple yet powerful idea that is perfectly suited to the problem domain.
评论 #13518817 未加载
dwsover 8 years ago
Fun blast from the past. The original version of this shipped with Mark of the Unicorn&#x27;s Mince&#x2F;Scribble package for CP&#x2F;M. (Mince = Mince Is Not Complete Emacs)
评论 #13519369 未加载
AlexanderDhooreover 8 years ago
I once build a text editor using a rope[1] data structure where every line was a node. The tree was augmented[2] with information about line numbers, titles in the document... for very fast navigation. I don&#x27;t think primitive data structures like a gap buffer are useful anymore. They come from a time where saving on memory was more important than it is now.<p>EDIT: I forgot it was also a self balancing tree! Very cool stuff.<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Rope_(data_structure)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Rope_(data_structure)</a> [2] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Interval_tree#Augmented_tree" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Interval_tree#Augmented_tree</a>
评论 #13520037 未加载
评论 #13519784 未加载
评论 #13523098 未加载
gf263over 8 years ago
I never understood why these webpages can&#x27;t have like, 4 lines of CSS to make them much more readable. Preserve the older aesthetic I guess?
评论 #13523790 未加载
评论 #13521650 未加载
评论 #13521519 未加载
评论 #13521460 未加载
erikbover 8 years ago
&gt; In its most general form, text editing is the process of taking some input, changing it, and producing some output.<p>Funny how similar that definition is to the &quot;programming&quot; one.
评论 #13520589 未加载
z3t4over 8 years ago
As someone currently working on a code editor I love this stuff, but there&#x27;s usually more focus on the technical part then the human part. With todays hardware we can do millions of stupid things every second and it will still feel snappy. We should spend more time trying to optimize for the humans instead of their computer.
jwhitlarkover 8 years ago
I liked it so much I bought a hard copy a couple years ago. Lots to learn in that book.