Skip to content

Latest commit

 

History

History
111 lines (75 loc) · 2.88 KB

File metadata and controls

111 lines (75 loc) · 2.88 KB

EDFI

A lightweight, vim-like modal terminal text editor written in Rust using Ratatui.

Features

Current Features

  • Modal Editing: Vi-inspired dual-mode editing system
  • File Operations: Create, open, and save files
  • Smart Cursor Movement: Navigate efficiently through text
  • Command Line Integration: Open files directly from terminal
  • Auto-scrolling: Smooth horizontal and vertical scrolling when cursor moves beyond visible area
  • Line Management: Automatic line creation, deletion, and merging
  • Backspace Handling: Intelligent line merging and deletion
  • Visual Feedback: Clear indication of current mode and file status
  • Line Deletion: Delete entire lines in normal mode
  • Find Mode: Search in the file.
  • Undo/Redo: History management for editing operations.

Modes

Normal Mode

  • i - Enter editing mode
  • s - Save current file
  • o - Open/reload file (reloads content from the originally opened file)
  • d - Delete current line
  • q - Quit editor
  • Arrow keys - Move cursor
  • Home - Move to beginning of line
  • End - Move to end of line

Editing Mode

  • ESC - Return to normal mode
  • Enter - Create new line
  • Backspace - Delete character or merge lines intelligently
  • Arrow keys - Move cursor
  • Home - Move to beginning of line
  • End - Move to end of line
  • Any printable character - Insert at cursor position

Find Mode

  • ESC - Return to normal mode
  • Arrow keys - Move cursor
  • Any printable character - Search in the file

Installation

Make sure you have Rust installed, then:

git clone https://git.sr.ht/~oled/edfi
cd edfi
cargo build --release

Usage

Create a new file

./target/release/edfi

This creates a file called "new_file" by default.

Open an existing file

./target/release/edfi filename.txt

Open a non-existent file (creates new file)

./target/release/edfi newfile.txt

Images

Configuration

image

ffetch configuration with EDFI

Rust Code

image

Find

image

Planned Features

  • Rhai Script Support: Extend editor functionality with Rhai scripting
  • Enhanced Syntax Highlighting: Support for more programming languages
  • Multiple File Support: Work with multiple files simultaneously
  • Configuration System: Customizable key bindings and settings

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

Author

Created by 0l3d