hluk/FakeVim

:w does not behave same as Ctrl-S

Closed this issue · 3 comments

I set the beautifier plugin to automatically format source files when saved, but in fakevim mode, :w doesn't trigger it.
If I choose Save from File menu, the formatter is triggered.

Now I have to enable Pass control key in fakevim settings and press Ctrl-S to trigger formatting.
Should we change the behaviour and make :w work same as Ctrl-S ?

hluk commented

This is handled in Qt Creator -- here is the code.

Seems that calling DocumentManager::saveDocument() doesn't trigger other plugins. Do you see any difference with ":wa"?

Maybe using triggerAction(Core::Constants::SAVE) instead would solve the issue.

hluk commented

It's in master branch of Qt Creator -- will be fixed in some future version.