First things first. There are two "Ex-modes" in Vim. One is for :h Q
, and another one is for :h gQ
. Let's explain the difference.
gQ
is kind of Vim's extension. It works as if user types in the standard Command-line mode and keeps returning back to it (not to Normal mode as usual). So gQ
internal implementation is really simple. It fully re-uses Vim's standard command-line editor. This mode still presents in both Vim and Neovim.
Q
on the other hand is a POSIX thing. There's a whole piece of text in the POSIX docs to explain which keys must do what in the Q-mode. It is really "an emulation of Vi", "how it was done in the 70s by Bill Joy", etc. No fancy arrows, no mappings or abbreviations and such.
Therefore, to provide support for POSIX Q
Vim had and still has a few hundred lines of code (mostly for "Ex-like line editing"). But Neovim never was a POSIX-compatible thing, so in Neovim Q
was disabled long time ago (disabled completely, and not just by remapping keys that user can undo as in defaults.vim
). But the actual code was still compiled. Until it was eventually deleted in 2021 (FYI, I submitted the patch).
Q
togq
). I understand that you would like a more modern version of the Ex mode. It would be helpful to understand what you would like to achieve with theEx
mode or its modernized version. Could you elaborate on that?