Git Product home page Git Product logo

Comments (1)

rhysd avatar rhysd commented on July 17, 2024

What's your data structure for text storage?

The text buffer implementation is a very simple array of line strings. The reason is its simplicity.

I know more efficient data structures for text editing such as gap buffer, piece table, rope, etc... but they are complicated. The reason to adopt them is their efficiency. However, no one haven't claimed about the performance of this crate. So the efficiency would not benefit no one for now (as far as I know). On the other hand, they have an obvious cons that they bring complexity and more external dependency. That's why I don't adopt them.

I want to write an editor and use this crate

I don't recommend using this crate for 'serious' text editor implementation. That's why I named this crate tui-textarea, not tui-text-editor. This crate aims to implement something like HTML's <textarea> in terminal. (No one would think to use <textarea> for serious text editor implementation.)

This crate has only very basic features for text editing. You'll soon find that this crate does not meet all of your text editor's requirements. I strongly recommend you creating your own TUI implementation built on top of great terminal libraries such as crossterm or termwiz directly.

from tui-textarea.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.