Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
secondcoming
· 1y ago · 0 comments
Is it even possible to write any text editor without some form of rope data structure?
Comments
[–]
cschmidt
1y ago
Here's a paper reviewing the various choices, that is often mentioned in discussions around data structures for text editors:
https://www.cs.unm.edu/~crowley/papers/sds.pdf
[–]
ben-schaaf
1y ago
VSCode uses a piece table (
https://code.visualstudio.com/blogs/2018/03/23/text-buffer-r...
).
[–]
canucker2016
1y ago
MS Word used piece table, which led to the "fast save" feature - which saved only the newer pieces.
[–]
caconym_
1y ago
Gap buffers are the other classic option, and there are others too, e.g. piece tables.
[–]
marssaxman
1y ago
Most certainly: gap buffers, piece tables, and line arrays are also popular choices.