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

@@ -1196,7 +1196,8 @@ bool FakeVimPluginPrivate::initialize()
Command *cmd = nullptr;
cmd = ActionManager::registerAction(theFakeVimSetting(ConfigUseFakeVim)->action(),
INSTALL_HANDLER, Context(Core::Constants::C_GLOBAL), true);
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+Shift+V,Meta+Shift+V") : Tr::tr("Alt+V,Alt+V")));
cmd->setDefaultKeySequence(QKeySequence(useMacShortcuts ? Tr::tr("Meta+Shift+Y,Meta+Shift+Y")
: Tr::tr("Alt+Y,Alt+Y")));
ActionContainer *advancedMenu =
ActionManager::actionContainer(Core::Constants::M_EDIT_ADVANCED);
@@ -1207,7 +1208,8 @@ bool FakeVimPluginPrivate::initialize()
auto act = new QAction(this);
act->setText(Tr::tr("Execute User Action #%1").arg(i));
cmd = ActionManager::registerAction(act, base.withSuffix(i));
cmd->setDefaultKeySequence(QKeySequence((useMacShortcuts ? Tr::tr("Meta+Shift+V,%1") : Tr::tr("Alt+V,%1")).arg(i)));
cmd->setDefaultKeySequence(QKeySequence((useMacShortcuts ? Tr::tr("Meta+Shift+Y,%1")
: Tr::tr("Alt+Y,%1")).arg(i)));
connect(act, &QAction::triggered, this, [this, i] { userActionTriggered(i); });
}