Skip to content

RanXom/hecto

Repository files navigation

Hecto - A Rust CLI Text Editor

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.

Features

Currently, Hecto supports:

  • Displaying a clean editor interface with tildes (~) on empty lines.
  • A welcome message at startup.
  • Opening, displaying & editing the contents of .txt files.
  • File status indication.
  • Save & save as functionality.
  • Searching text with highlights.
  • Improved UI for a better editing experience.

Note:

Syntax highlighting is not implemented, as adding this feature might shift the focus of the project from a text editor to a code editor.

Getting Started

Follow these steps to clone and run Hecto on your local machine:

Prerequisites

  • Rust (latest stable version recommended)

Installation

  1. Clone the repository:

    git clone https://github.com/RanXom/hecto.git
    cd hecto
  2. Build the project:

    cargo build --release
  3. Run the editor:

    cargo run

Usage

  • Open the editor by running the above command.
  • Use arrow keys for navigation.
  • Open .txt files 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.

Resources

This project has been developed using the following resources:

  1. Hecto: Build Your Own Text Editor in Rust
  2. Rust Cheatsheet
  3. Rust Design Patterns
  4. VT100 User Guide

Contributing

Contributions are welcome! Feel free to fork the repository, create a branch, and submit a pull request for improvements or new features.

Acknowledgments

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.

License

This project is licensed under the MIT License. Please note that this project is based on a public guide, and similar implementations may exist.

About

A CLI text editor built using Rust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages