Hecto is a basic text editor,
re-implemented in Rust based on the original kilo editor,
as outlined in Build Your Own Text Editor.
This project serves as an exercise for me to learn Rust, following the blog post Hecto: Build your own text editor in Rust with modifications.
- Basic text editing
- Search
- Syntax highlighting
On Linux that uses the X Window System, you need to install the following dependencies:
libxcb-shape0-devlibxcb-xfixes0-dev
For example, on Ubuntu:
sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev-
Clone the repository:
git clone
-
Open a file with Hecto:
cargo run --release <file>
-
(Optional) Install Hecto:
cargo install --path .Then, run Hecto:
hecto <file>
hecto <file>- Arrow keys: Navigate the text.
- Page Up/Page Down: Navigate the text by page.
- Home/End: Navigate to the beginning/end of the line.
- Backspace: Delete the character before the cursor.
- Delete: Delete the character at the cursor.
- Enter: Insert a newline.
- Tab: Insert a tab (1 space).
- Ctrl-V: Paste from the system clipboard.
- Ctrl-F: Find, navigate with arrow keys, press Enter to confirm and Esc to cancel.
- Ctrl-Q: Quit, requires multiple presses to quit if there are unsaved changes.
- Ctrl-S: Save, prompt for a filename if there is no filename associated with the file.
Hecto is licensed under CC BY 4.0.