github.com/homonoidian/aspis
trunk / published Mar 11, 2023 / repository
an in-progress text editor thing
aspis
🚧 in progress!!!
Will be either:
- a fast, small, plug-n-play logic-only (eg SFML, SDL, etc.) text editor core See Monaco from Microsoft but this thing is really separate, while Monaco is web-based and also just code extracted from VS Code
- a very opinionated text editor
- another one of my dead projects
I don't know which one yet.
also, if you're reading the source code you'll see polished code mixed with smelly code, and certain parts have different names for the editor itself! this whole thing is assembled from my previous fiddlings
Features
what it's supposed to do generally:
- be reasonably fast for large and very large files (like ±100MB files). this isn't practical but good for benchmarking haha!
- support millions of cursors/selections at the same time
- support millions of selections
- show that Crystal code can be written like Smalltalk and still be fast!!! this is really personal for me, you're welcome to read the code and say what you think of it!
- etc.
what I wanted/want it to become:
an opinionated text editor!
- Bitmap font only!
- Monochrome/not-many-chrome only!
- Fast
- Blank slate, everything must be configured
- etc.
Installation
TODO: Write installation instructions here
Usage
TODO: Write usage instructions here
Development
TODO: Write development instructions here
Contributing
- Fork it (https://github.com/your-github-user/aspis/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Alexey Yurchenko - creator and maintainer
API
- Array(T)
An
Arrayis an ordered, integer-indexed collection of objects of type T. - BlockCursor
Block appearance for
Cursor. - CharStep
The default kind of cursor step.
- Cohn
[ ] self-sufficient cursor
- Cursor
Represents a cursor in the editor.
- CursorStep
Clients are allowed to pick which step
Cursormoves with. - Document
- DragHandler
- EventHandler
- EventTarget
- Hi
- HiKeyword
- InputHandler
- Ins
- KeyboardHandler
- LightTheme
- Line
Represents a logical line in a
TextBuffer. - MouseButtonHandler
- NoHi
- NordTheme
- Op
- Platform
- RGBA
- ScrollableDocument
- SeekSettings
Describes how a cursor should seek.
- Selection
A selection is a
Spanbetween a pair ofCursors. - Span
- Stream(T)
A suckless reactive stream toolkit.
- String
A
Stringrepresents an immutable sequence of UTF-8 characters. - Sub
- SynFrag
- SynText
- TextBuffer
TextBufferis an abstraction over a string and an array of line bounds (seeLine) in that string. - Theme
A multi-line capable syntax fragment.
- WordDragStep
Advances the cursor to the beginning or to the end of the word the speculative next character lands in, depending on whether the selection's cursor is before or after its anchor, respectively.
- WordStep
Advances the cursor to the beginning or to the end of the word the speculative next character lands in, depending on whether the movement's direction is left or right, respectively.