Commit 2ee91c8a authored by Martin Aumüller's avatar Martin Aumüller Committed by hjk
Browse files

fakevim: map ctrl-] (follow tag in vim) to "Follow symbol under cursor" and...


fakevim: map ctrl-] (follow tag in vim) to "Follow symbol under cursor" and ctrl-t (move up in tag stack) to "Go Back"

Merge-request: 131
Reviewed-by: default avatarhjk <qtc-committer@nokia.com>
parent fc685182
......@@ -1772,6 +1772,8 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
m_movetype = MoveExclusive;
m_subsubmode = FtSubSubMode;
m_subsubdata = key;
} else if (key == control('t')) {
handleCommand("pop");
} else if (!m_gflag && key == 'u') {
undo();
} else if (key == control('u')) {
......@@ -1928,6 +1930,8 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
removeSelectedText();
} else if (key == Key_BracketLeft || key == Key_BracketRight) {
} else if (key == control(Key_BracketRight)) {
handleCommand("tag");
} else if (key == Key_Escape) {
if (isVisualMode()) {
leaveVisualMode();
......
......@@ -67,6 +67,8 @@
#include <utils/savedaction.h>
#include <utils/treewidgetcolumnstretcher.h>
#include <cppeditor/cppeditorconstants.h>
#include <cpptools/cpptoolsconstants.h>
#include <indenter.h>
......@@ -553,6 +555,8 @@ FakeVimPluginPrivate::FakeVimPluginPrivate(FakeVimPlugin *plugin)
s_defaultExCommandMap[ProjectExplorer::Constants::BUILD] = QRegExp("^make$");
s_defaultExCommandMap["Coreplugin.OutputPane.previtem"] = QRegExp("^(cN(ext)?|cp(revious)?)!?( (.*))?$");
s_defaultExCommandMap["Coreplugin.OutputPane.nextitem"] = QRegExp("^cn(ext)?!?( (.*))?$");
s_defaultExCommandMap[CppEditor::Constants::JUMP_TO_DEFINITION] = QRegExp("^tag?$");
s_defaultExCommandMap[Core::Constants::GO_BACK] = QRegExp("^pop?$");
}
FakeVimPluginPrivate::~FakeVimPluginPrivate()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment