6 releases

0.3.3 Mar 1, 2024
0.3.2 Feb 18, 2024
0.2.2 Feb 3, 2024
0.2.1 Dec 29, 2023
0.1.0 Nov 28, 2023

#138 in Text editors

Download history 8/week @ 2024-01-28 2/week @ 2024-02-04 2/week @ 2024-02-11 193/week @ 2024-02-18 146/week @ 2024-02-25 36/week @ 2024-03-03 23/week @ 2024-03-10 1/week @ 2024-03-17 68/week @ 2024-03-31

68 downloads per month

MIT license

460KB
2K SLoC

edtui

EdTUI

Overview

EdTUI is a text editor widget for the Ratatui ecosystem. It is designed to provide a light-weight user experience inspired by Vim.

Features

  • Vim-like keybindings and editing modes for efficient text manipulation.
  • Normal, Insert and Visual mode.
  • Clipboard: Uses the arboard clibpboard by default which allows copy pasting between the system clipboard and the editor.

Keybindings

EdTUI offers a set of keybindings similar to Vim. Here are some of the most common keybindings:

Normal/Visual Mode:
Keybinding Description
i Enter Insert mode
v Enter Visual mode
h, j, k, l Navigate left, down, up, and right
w, b Move forward or backward by word
x Delete the character under the cursor
Del Delete the character left of the cursor
u, r Undo/Redo last action
Esc Escape Insert mode or Visual mode
0 Move cursor to start of line
^ Move cursor to first non-blank character
$ Move cursor to end of line
a Append after the cursor
A Append at the end of the line
o Add a new line below and enter Insert mode
O Add a new line above and enter Insert mode
Backspace Delete the previous character
d Delete the selection
dd Delete the current line
ciw Select between delimiters. Supported: ["]
u Undo the last change
r Redo the last undone action
y Copy the selected text
p Paste the copied text
Insert Mode:
Keybinding Description
Esc Return to Normal mode

For more keybindings and customization options, refer to the code.

Demo

Roadmap

  • Clipboard

  • Search

  • Vims f/t go to first

  • Support termwiz and termion

  • Display line numbers

  • Remap keybindings

  • Soft-wrap lines

License: MIT

Dependencies

~6–16MB
~215K SLoC