Skip to content

Lai-YT/hecto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hecto


Hecto is a basic text editor,
re-implemented in Rust based on the original kilo editor,
as outlined in Build Your Own Text Editor.
Hecto

Brief

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.

Features

  • Basic text editing
  • Search
  • Syntax highlighting

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone
  2. Open a file with Hecto:

    cargo run --release <file>
  3. (Optional) Install Hecto:

    cargo install --path .

    Then, run Hecto:

    hecto <file>

Usage

hecto <file>

Navigation

  • Arrow keys: Navigate the text.
  • Page Up/Page Down: Navigate the text by page.
  • Home/End: Navigate to the beginning/end of the line.

Editing

  • Backspace: Delete the character before the cursor.
  • Delete: Delete the character at the cursor.
  • Enter: Insert a newline.
  • Tab: Insert a tab (1 space).

Commands

  • 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.

License

Hecto is licensed under CC BY 4.0.

About

A basic text editor. 💻

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages