Coder Social home page Coder Social logo

coredit's Introduction

Coredit

Latest Release Documentation

๐Ÿ–‹ A text editor buffer component based on Ropey with multiselection heavy lifting.

What Coredit is

While there are crates providing data structures to keep text maintaining performance on random access the other common part is how a cursor should act. Inspired by Kakoune, Coredit attempts to simplify creation of a custom text editor with sensible defaults, including multiple selections. (Those who don't like multiple selections can use only one!)

What Coredit is not

It's not an editor: at least you need to attach a keyboard reader and to draw current state of the buffer. However, there is a minimal editor in examples directory (cargo run --example edi).

Coredit doesn't try to be full-featured: it is busy storing text, doing manual changes and controlling selections. LSP integrations, Lua scripting, highlighting and M-x doctor could be main features of the text editor you made, but they should not belong to the buffer core.

State of the crate

By tradition, let's call this a very WIP. Seriously, there is a known room for improvement by means of performance, also API may become heavier if the idea of "minimal core" is not that good.

coredit's People

Contributors

fominok avatar

Watchers

 avatar  avatar

coredit's Issues

Movement by text object

Need to introduce concept of "text object" to allow fancy movements: move by word, WORD, paragraph and probably whatever that could be configured.

Main selection

If all selections will be dropped, which one should stay?

Rewrite selections storage

While std Btree is ok for now, many of the operations could be done effectively on a custom implementation that will not do rebalancing or such things on something like "move right after", as this does not change any orders.

Clipboard: insert

Insertion with multiple selections active should respect if previous yank was done with multiple selections as well

Deltas

Instead of manual querying desired text and selections after each action it might be reasonable to return deltas, at least entire changed lines text with selections

Line cursor style

Does it really comply with line-styled cursors? How to distinguish a selection of 1 character vs cursor in current project state?

Place cursor under

There is no functionality to place multiple cursors, but this is necessary at least for example on initial release; this one should be the most simple as not related to underlying text

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.