grassleaff/mi
2
0
Fork
You've already forked mi
0
mi is a minimalist Vim-like text editor written in C++ using ncurses, with a focus on simplicity. Aimed at developers, it features built-in features to make code easier.
  • C++ 96.6%
  • Makefile 3.4%
2026年04月24日 17:50:19 +02:00
assets FIX: Fix cache of mi.png old image 2026年04月22日 03:43:53 -03:00
src ADD: New custom user colors on config.h 2026年04月24日 12:45:30 -03:00
.gitignore ADD: Modify .gitignore to not track the mi executable 2026年03月17日 09:59:29 -03:00
LICENSE Update copyright holder in LICENSE file 2026年02月19日 21:49:44 -03:00
Makefile ADD: New custom user colors on config.h 2026年04月24日 12:45:30 -03:00
README.md FIX: Fixing README.md 2026年04月24日 17:50:19 +02:00

mi

mi is a minimal, Vim-inspired text editor written in C++ using ncurses. It is designed as a lightweight minimal but powerful terminal editor.


Features

  • Modal editing (NORMAL, INSERT, COMMAND)
  • Line numbers
  • User-configurable config.hpp
  • Command mode (:w, :q, :wq)
  • Status bar with:
    • Current mode
    • Line and column position
    • Open file name
  • Colored status bar (mode-aware)
  • Cursor navigation with arrow keys and wasd alternatives
  • File loading and saving
  • Built-in file manager (FLM)
  • Built with ncurses

Customization

The editor ships with a central config file at src/include/config.hpp.

You can tweak things like:

  • Line number mode (NONE, ABSOLUTE, RELATIVE)
  • TAB width
  • FLM panel width
  • Status bar and FLM colors
  • Custom ncurses RGB colors in 0..1000 scale

Example with multiple custom colors in src/include/config.hpp:

constexpr CustomColor custom_black = make_custom_color(0, 30, 30, 30);
constexpr CustomColor custom_grey = make_custom_color(2, 120, 120, 120);
constexpr CustomColor active_custom_colors[] = {
 custom_black,
 custom_grey,
};
constexpr short status_normal_fg = custom_black;
constexpr short flm_select_fg = custom_grey;

Controls

NORMAL mode

  • i — enter INSERT mode
  • ARROW KEYS or wasd — move cursor
  • A — enter INSERT mode after the cursor
  • : — enter COMMAND mode

INSERT mode

  • Type to insert text
  • ESC — return to NORMAL mode
  • ARROW KEYS — move cursor
  • BACKSPACE — delete character

COMMAND mode

  • :w — save file
  • :q — quit
  • :wq — save and quit
  • ESC — cancel command

Keybinds

  • Ctrl+f or :flm — open the FLM file manager
  • In the FLM, use w/s to move, d or ENTER to open, and a/BACKSPACE to go up

Dependencies

  • GNU GCC/G++
  • GNU Make
  • ncurses

Building and Running

STEP 1 - Installing libncurses:

On Debian or Ubuntu:

sudo apt install libncurses-dev

On CentOS/RHEL/Scientific Linux 6.x/7.x+ and Fedora Linux 21 or older:

sudo yum install ncurses-devel

On Fedora Linux 22.x+:

sudo dnf install ncurses-devel

STEP 2 - Cloning and Installing:

git clone https://github.com/nothingburguer/mi
cd mi
sudo make install
mi [filename]
# Examples:
# mi main.cpp
# mi index.js
# mi script.py

ALT 1 - Uninstalling:

(On the repo folder)

cd mi
sudo make uninstall

ALT 2 - Local Build

git clone https://github.com/nothingburguer/mi
cd mi
make
# To clean:
# make clean

Screenshots

[画像:image]
[画像:image]