Skip to content

OkayishDEV/SEVI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SEVI (Super Easy Vim)

SEVI is a vim/neovim clone built in Rust using the ratatui library for terminal rendering and crossterm for backend events. It retains the powerful modal concepts of Vim but makes them Super Easy and accessible for beginners by showing an interactive cheatsheet, clear visual feedback, and offering standard text-editor safety features and keyboard shortcuts.


Key Features

  1. Modal Editing

    • Normal Mode (Esc): Traditional vim navigation (h, j, k, l, 0, $, g, G) and commands.
    • Insert Mode (i/a/o/O): Standard character input with standard typing controls (arrows, backspace, delete, enter).
    • Visual Mode (v): Highlight block selections of text.
    • Command Mode (:): Run editor actions (:w, :q, :wq, :q!, :help, etc.).
    • Search Mode (/): Dynamic text search.
  2. Interactive Cheat Sheet Sidebar

    • Visible by default on the right-hand side.
    • Summarizes commands for every mode so you never get stuck.
    • Toggle it on or off at any time by pressing F1 or typing :h (or :help).
  3. Status Bar & Premium Aesthetics

    • Color theme dynamically updates to match the current mode (e.g. Green for INSERT, Blue for NORMAL, Yellow for VISUAL, Magenta for COMMAND, Teal for SEARCH).
    • Shows active line numbers with highlighting on the current cursor line.
    • Displays file info, change status, and key hints suited to your active mode.
  4. Friendly Exit Safeguards

    • Prevents accidental loss of unsaved changes. Hitting :q or Ctrl-Q with unsaved modifications triggers an interactive double-check popup prompt:
      • y: Save and exit.
      • n: Exit discarding changes.
      • Esc: Cancel and return to editing.
  5. Search & Replace

    • Enter / to type a search query. It highlights all matches in the file.
    • Jump through matches using n (next match) and N (previous match).
    • Use command-line search & replace:
      • :s/find/replace/g to replace on the current line.
      • :%s/find/replace/g to replace globally across the entire file (supports escaped characters).
  6. Standard Keyboard Shortcuts

    • Ctrl - S: Quick Save (prompts for a filename if it's a new unnamed file).
    • Ctrl - Q: Quick Quit.
    • Ctrl - R: Redo (complements u for undo).
    • Tab: Automatically inserts 4 spaces.
  7. Undo & Redo

    • Full history snapshots (up to 100 deep) let you reverse edits with u (undo) and re-apply them with Ctrl-R (redo).

Getting Started

Prerequisites

Make sure you have Rust and Cargo installed:

cargo --version

Build

To compile the editor:

cargo build --release

The binary will be compiled to target/release/SEVI.

Run

To start the editor:

cargo run -- <filename>

For example, to edit or create a file named hello.txt:

cargo run -- hello.txt

To run the release build directly:

./target/release/SEVI hello.txt

Core Keybindings Cheatsheet

Action Key (Normal Mode) Key (Insert Mode) Key (Visual Mode) Key (Command Mode)
Return to Normal - Esc Esc Esc
Move Cursor h/j/k/l or Arrows Arrows h/j/k/l or Arrows -
Line Start / End 0 / $ - 0 / $ -
File Start / End g (twice: gg) / G - g (twice: gg) / G -
Edit Mode i (insert) / a (append) - - -
Open New Line o (below) / O (above) - - -
Cut / Delete dd (line) / x (char) Backspace / Delete d / x Backspace
Copy (Yank) yy (line) - y -
Paste p - - -
Undo / Redo u / Ctrl - R - - -
Find Text / - - -
Next / Prev Match n / N - - -
Quick Save Ctrl - S Ctrl - S - -
Quick Quit Ctrl - Q Ctrl - Q - -

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages