Hecto is a simple yet powerful CLI text editor inspired by VIM, built entirely in Rust. This project is a guided learning experience based on Philipp Flenker's tutorial series, with plans to expand its features and functionality that I may find missing. Through this project, my goal is to deepen my understanding of Rust and learn to write idiomatic Rust code by following a project-based learning approach.
Currently, Hecto supports:
- Displaying a clean editor interface with tildes (
~) on empty lines. - A welcome message at startup.
- Opening, displaying & editing the contents of
.txtfiles. - File status indication.
- Save & save as functionality.
- Searching text with highlights.
- Improved UI for a better editing experience.
Syntax highlighting is not implemented, as adding this feature might shift the focus of the project from a text editor to a code editor.
Follow these steps to clone and run Hecto on your local machine:
- Rust (latest stable version recommended)
-
Clone the repository:
git clone https://github.com/RanXom/hecto.git cd hecto -
Build the project:
cargo build --release
-
Run the editor:
cargo run
- Open the editor by running the above command.
- Use arrow keys for navigation.
- Open
.txtfiles to view their content, using the following command:
cargo run path/to/your/txt/file- Edit files with character insertion and deletion.
- Use the search functionality to find text within your files, with matches highlighted.
- Save your changes using the save functionality.
This project has been developed using the following resources:
Contributions are welcome! Feel free to fork the repository, create a branch, and submit a pull request for improvements or new features.
This project is based on Philipp Flenker's guide to building a text editor in Rust. Special thanks to him for creating an excellent learning resource.
This project is licensed under the MIT License. Please note that this project is based on a public guide, and similar implementations may exist.