Я пытался отобразить 'q!' на "Q!" в .vimrc? Я попробовал следующее, но не работает. : команда Q! д! Пожалуйста, предоставьте любое предложение, чтобы смягчить эту проблему. Спасибо.
Просто необходимо дать
:command Q q
Точно так же, можно сделать для других команд как,
:command WQ wq
:command W w
Попробуйте это:
:cmap Q! q!
Карты Q!
в командном режиме к q!
.
Это работало отлично на меня:
:command-bang Q q<bang>
От справки энергии ( :h command-bang
):
Special cases :command-bang :command-bar
:command-register :command-buffer
There are some special cases as well:
-bang The command can take a ! modifier (like :q or :w)
и
Replacement text
The replacement text for a user defined command is scanned for special escape
sequences, using <...> notation. Escape sequences are replaced with values
from the entered command line, and all other text is copied unchanged. The
resulting string is executed as an Ex command. [...]
The valid escape sequences are
[...]
<bang> (See the '-bang' attribute) Expands to a ! if the
command was executed with a ! modifier, otherwise
expands to nothing.
[...]