FakeVim: Change shortcuts from Alt-V,X to Alt-Y,X

Alt-V is taken by the Views menu nowadays.

Also, fix the instruction to quit FakeVim on Mac.

Fixes: QTCREATORBUG-24694
Change-Id: I5268760f45e34f973b3b38b19d2577c0c655b000
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2020-11-10 09:33:02 +01:00
parent eb45b8f9b9
commit 289a18f56f
3 changed files with 14 additions and 7 deletions

View File

@@ -4353,10 +4353,15 @@ bool FakeVimHandler::Private::handleNoSubMode(const Input &input)
} else if (input.is('C')) {
handleAs("%1c$");
} else if (input.isControl('c')) {
if (isNoVisualMode())
showMessage(MessageInfo, Tr::tr("Type Alt-V, Alt-V to quit FakeVim mode."));
else
if (isNoVisualMode()) {
#if defined(Q_OS_MACOS)
showMessage(MessageInfo, Tr::tr("Type Meta-Shift-Y, Meta-Shift-Y to quit FakeVim mode."));
#else
showMessage(MessageInfo, Tr::tr("Type Alt-Y, Alt-Y to quit FakeVim mode."));
#endif
} else {
leaveVisualMode();
}
} else if ((input.is('d') || input.is('x') || input.isKey(Key_Delete))
&& isVisualMode()) {
cutSelectedText();