Move "Toggle QNVim" initalization into QNVimPlugin::initialize(const QStringList &arguments, QString *errorString) to call it only once (no need to call it every toggle).
Add bool reopen argument to initialize() to reapply initialization to current document for toggling, closes #21.
Move initialize() to the private section and change return value from bool to void because this function always returned true and its value was not used in toggleQNVim in any way. Exactly the same approach is used in FakeVim, so I think it's ok.
QNVimPlugin::initialize(const QStringList &arguments, QString *errorString)
to call it only once (no need to call it every toggle).bool reopen
argument toinitialize()
to reapply initialization to current document for toggling, closes #21.initialize()
to the private section and change return value frombool
tovoid
because this function always returned true and its value was not used intoggleQNVim
in any way. Exactly the same approach is used in FakeVim, so I think it's ok.