You should read TODO in the manual before proceeding.

Vim mode is implemented in src/ui/vim.h and src/ui/vim.cpp. It is enabled and disabled by calling Vim::enable.

When a QWidget or GObject receives a keyPressEvent, it has the option to process that event in Vim mode. It is supposed to call Vim::registerKeyPress, providing the incoming event and a pointer to a callback function as parameters. The callback function will be invoked if a proper key sequence is matched.

Todo

Add more details.

namespace Vim

Typedefs

typedef Count N

Functions

void enable(bool enable)
bool enabled()
Count n()
void addBinding(const QString &sequence, const QString &action)
void addBindings(const QMap<QString, QString> &map)
void registerKeyPress(QKeyEvent *event, std::function<bool(const Action &action)> callback, bool allowCount = true, )
void resetStroke()
QString getStatusText()
class Action

Public Functions

explicit Action(const QString &command, int count = 0)
QString getCommand() const
Count getCount() const
bool operator==(const QString &cmd) const
class Count

Public Functions

Count(int count)
operator int() const
int raw() const