A Rust implementation of the Kilo text editor tutorial: https://viewsourcecode.org/snaptoken/kilo/index.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
||7 months ago|
|src||7 months ago|
|.gitignore||2 years ago|
|Cargo.lock||2 years ago|
|Cargo.toml||2 years ago|
|README.md||2 years ago|
A reimplementation of the Kilo tutorial in Rust.
editorprefix has been removed from all the editor methods. Since this implementation uses
impls on a shared
Editorstruct, the prefix is redundant
- Any C equivalent functionality based on memory allocating/deallocating, or other manual book-keeping is instead implemented in a more idiomatic Rust fashion.
- Row structs are referenced by their index in the Editor struct, rather than as a direct reference in method calls. This generally simplifies dealing with the rules of Rust (borrow checker).
promptmethod of the editor can not take an arbitrary formatting string, due to Rust requiring a string literal for string formatting macros.
Additions / Changes
- Reverse coloring for search results, so comment types can have different colors
- Two separate vectors are used to define the two types of keywords, rather than the weird pipe suffix