Skip to content

About

A minimal Terminal based Text Editor

Resources

Security policy

Stars

11 stars

Watchers

1 watching

Forks

Repository files navigation

Text Editor in Rust

Apache 2.0 License GitHub stars Rust Repo Size

LinkedIn Twitter/X

A modal text editor inspired by Neovim, built with Rust.

Screenshot of editor

Features

  • Modal Editing: Normal, Insert, Command, and Visual modes.
  • Vim-like Keybindings: hjkl navigation, i for insert, v for visual, :w, :q commands.
  • Clipboard Integration: Copy (y) and Paste (p) using system clipboard.
  • Mouse Support: Click to move cursor.
  • Extensive Themes: 12+ built-in themes (Dracula, Nord, Catppuccin, etc.) with external file support.
  • Syntax Highlighting: Auto-detection for Rust, C, C++, Java, JS/TS, and Python. Distinguishes between keywords, types, and control flow.
  • Basic Auto-Completion: Context-aware suggestions while typing.
  • Configuration: Customizable via .config/config.toml.
  • Performance: Built with ratatui and crossterm for high-performance TUI.

Tech Stack

  • Language: Rust
  • Rendering: ratatui - A Rust TUI library.
  • Input/Terminal: crossterm - Cross-platform terminal manipulation.
  • Configuration: serde & toml - For parsing the config file.
  • Data Structure: ropey - A Utf8 text rope for fast editing.

How to Run

  1. Prerequisites: Ensure you have Rust installed (cargo).

  2. Build:

    cargo build --release
  3. Install:

    Option A: Automatic Installation (Recommended) Run the installation script to build, install, and configure your PATH automatically:

    chmod +x install.sh
    ./install.sh

    Option B: Manual Installation

    cargo install --path .

    Add the binary path to your shell configuration (e.g., .zshrc, .bashrc):

    export PATH="$HOME/.cargo/bin:$PATH"
  4. Run:

    meow filename.txt

Customization

The editor looks for a configuration file at ~/.config/meow/config.toml (global) or .config/config.toml (local override).

Default Configuration

[editor]
line_numbers = true
mouse_support = true
theme = "dracula" # Set your preferred theme here

[theme]
background = "#1e1e1e"
foreground = "#ffffff"
cursor = "#cccccc"
selection_bg = "#3e4451"

Keybindings

Normal Mode

  • h, j, k, l or Arrow Keys: Move cursor Left, Down, Up, Right.
  • i: Enter Insert Mode.
  • v: Enter Visual Mode.
  • x: Delete character under cursor.
  • p: Paste from system clipboard.
  • /: Enter Search Mode.
  • n / N: Next / Previous search match.
  • :; Enter Command Mode.
  • Scrolling function

Insert Mode

  • Esc: Return to Normal Mode.
  • Arrow Keys: Navigate while typing.
  • Backspace: Delete characters (merges lines if at start).
  • Auto-Completion:
    • Typing triggers suggestions.
    • Up / Down: Navigate suggestions.
    • Tab / Enter: Select suggestion.
  • Type normal characters to insert them.

Visual Mode

  • Move cursor or Arrow Keys to select text.
  • y: Yank (Copy) selection to system clipboard.
  • d: Delete selection.
  • x: Cut selection (Copy to clipboard and delete).
  • Esc: Return to Normal Mode.

Command Mode

  • :w or :w <filename>: Save file.
  • :q: Quit (unsaved changes will be lost immediately in this version).
  • :wq: Save and Quit.

Open DOCUMENTATION.md for user docs, or STUDY_GUIDE.md for a deep dive architectural manual.

About

A minimal Terminal based Text Editor

Resources

Security policy

Stars

11 stars

Watchers

1 watching

Forks

Contributors

Languages