Warning Experimental and early-stage. Expect bugs, incomplete features, and breaking changes.
vimotion is a Fcitx5 module that brings Vim-like modal editing to any application — system-wide. It intercepts key events through fcitx5 and translates Vim commands into standard system shortcuts.
- Three modes: Normal, Insert, Operator-Pending
- Motions:
hjklwbe0$ggG - Operators:
dyc+ motion,ddyycc(line operators) - Commands:
xXpPuCtrl+RiaIAoO - Count prefix:
3j,2dd,5x, etc. - Terminal detection: automatic Ctrl+Shift+C/V for terminal emulators
- Mode indicator:
[N]Normal,[I]Insert - Configurable through
fcitx5-configtool→ Addons → vimotion:- Auto-enable on focus
- Custom toggle hotkey
- App white/blacklist
- Insert-mode key sequence mappings (e.g.
jk→Escape)
vimotion ships as a single Fcitx5 module (vimotion.so). The module runs in the PreInputMethod phase and can be toggled per input context, which means:
- It runs alongside any other Fcitx5 input method (no need to switch IM).
- Each window has its own mode state.
- App filtering disables it inside vim/neovim/etc. by default.
- Fcitx5 and development libraries
- CMake ≥ 3.16, C++20 compiler
./install.shThe script auto-detects your distribution (Arch, Debian/Ubuntu, Fedora, openSUSE), installs missing dependencies, builds, runs the test suite, and installs the module. It is idempotent — re-running cleans stale installations first.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
ctest --test-dir build --output-on-failure
sudo cmake --install build- Log out and back in (so the env vars take effect).
- The module is loaded automatically with Fcitx5.
- Press
Ctrl+Escape(default toggle) —[N]appears in the input panel. - Press
ifor Insert Mode[I],Escape(or yourjkmapping) to return. - Press
Ctrl+Escapeagain to toggle off.
./uninstall.shOpen fcitx5-configtool → Addons → vimotion (or edit ~/.config/fcitx5/conf/vimotion.conf directly).
| Section | Key | Default | Description |
|---|---|---|---|
General |
EnabledByDefault |
False |
Auto-enable Normal Mode for every new input context |
General |
ToggleKey |
Control+Escape |
Hotkey list that toggles vimotion on/off |
AppFilter |
Mode |
Blacklist |
None, Blacklist, or Whitelist |
AppFilter |
Blacklist |
nvim, vim, neovim |
Substring match against the app's program name |
AppFilter |
Whitelist |
empty | Only active in these apps when Mode=Whitelist |
Mappings |
TimeoutMs |
200 |
Sequence timeout (50–2000 ms) |
Mappings |
InsertMap |
jk=Escape |
List of <sequence>=<keysym> mappings, applied in Insert Mode |
Like neovim's inoremap jk <Esc>, vimotion supports multi-key sequences in Insert Mode. Each entry has the form <sequence>=<key>:
jk=Escape
jj=Return
kj=Escape
- The sequence is held only as long as
TimeoutMs. If the next key isn't part of any mapping, the buffered keys are forwarded as-is and the new key passes through unchanged. - If the target is
Escape, vimotion switches to Normal Mode (it does not forward Escape to the underlying app). - Any other target key is forwarded directly.
ctest --test-dir build --output-on-failure70 tests cover toggling, motions, operators, count prefixes, per-IC state, app filters, custom toggle keys, EnabledByDefault, and the Insert-mode sequence matcher.
GPL-3.0 — see LICENSE