jm-tech-power-official/Vim-FX
Vim-FX — a tiny modal text editor in a native window. Familiar vim motions and modes, a mode-aware status line, and a small plugin system. Built with Qt (PySide6).
Vim-FX — v1.0.0
A polished modal desktop editor. Vim keys, a real window, and a plugin system that stays out of your way.
Category: Editor · OS: Linux · macOS · Windows
Vim-FX is a small modal text editor with a proper GUI, built on PySide6 (Qt for Python). It keeps the tight modal editing model of a terminal vim — NORMAL / INSERT / COMMAND — but renders in a clean dark window with a styled status bar, and runs the same on Linux, macOS, and Windows.
The buffer and modal logic is a Qt-free model, so plugins and tests can drive the editor without a display.
Install
Each platform installs into its own isolated virtualenv so Vim-FX's PySide6 never collides with anything else on your system.
Linux / macOS
unzip the package && ./install.sh vim-fx FILE
install.sh copies the app into ~/.local/share/vim-fx/, builds a private venv there, installs PySide6 into it, and drops a launcher at ~/.local/bin/vim-fx. On Linux it also installs a .desktop entry. It seeds ~/.config/vim-fx/plugins/ with the bundled example plugin only if you don't already have that directory — it never overwrites your plugins.
Uninstall with ./uninstall.sh (your plugins are left in place).
Windows
.\install.ps1 vim-fx FILE
install.ps1 installs into %LOCALAPPDATA%\Programs\vim-fx\ (app + private venv), adds a vim-fx.cmd wrapper to your PATH, and seeds %APPDATA%\vim-fx\plugins\. Uninstall with .\uninstall.ps1.
Usage
vim-fx FILE # open FILE (or start a new buffer if it doesn't exist) vim-fx # open an empty, unnamed buffer vim-fx --version # prints: vim-fx 1.0.0 (no PySide6 needed) vim-fx --selftest # build the app offscreen, pump events once, exit 0 vim-fx --help # usage
Modes & keys
Vim-FX starts in NORMAL mode.
NORMAL mode
| Key | Action | |-----|--------| | h j k l | move left / down / up / right (arrow keys also work) | | 0 | jump to start of line | | $ | jump to end of line | | g | jump to first line | | G | jump to last line | | i | enter INSERT mode at the cursor | | a | enter INSERT mode after the cursor (append) | | o | open a new line below and enter INSERT mode | | x | delete the character under the cursor | | dd | delete the current line | | : | enter the COMMAND line |
INSERT mode
- Typing inserts text at the cursor.
Entersplits the line at the cursor.Backspacedeletes the previous character (joins lines at column 0).Escreturns to NORMAL mode.
COMMAND line
| Command | Action | |---------|--------| | :w | save | | :q | quit (warns if there are unsaved changes) | | :q! | force quit, discarding changes | | :wq (or :x) | save and quit |
The status bar shows the current mode (green in NORMAL, amber in INSERT), the filename with a [+] modified flag, plugin/status messages, and the cursor position as line:col. Closing the window with unsaved changes prompts you to save.
Plugins
On startup Vim-FX loads every *.py file in ~/.config/vim-fx/plugins/ (%APPDATA%\vim-fx\plugins\ on Windows). If a plugin module defines a setup(editor) function, Vim-FX calls it with the editor object. A misbehaving plugin can't crash the editor — import and setup are wrapped in try/except and errors are reported on the status line.
Plugin API
The editor object passed to setup(editor) exposes a small, stable surface:
| Member | Description | |--------|-------------| | editor.status(msg) | show msg on the status line | | editor.register_command(name, fn) | add a :name command that calls fn(editor) | | editor.buffer | the buffer's lines, as a list[str] (read access) | | editor.cursor | the cursor as an (row, col) tuple (read access) | | editor.text() | the whole buffer as a single string |
Example plugin
The bundled wordcount.py registers a :wc command that reports word, line, and character counts on the status line:
def wc(editor):
lines = editor.buffer
text = "\n".join(lines)
editor.status("%d lines, %d words, %d chars"
% (len(lines), len(text.split()), len(text)))
def setup(editor):
editor.register_command("wc", wc)
Type :wc in the editor to see it in action. Drop your own *.py files into your plugin directory to add commands.