Frederisk/Wikitext-VSCode-Extension

Mark as saved after push (or option to auto-close tab)

Californ1a opened this issue · 1 comments

After pushing, the tab is still open in VSC for the page you pulled and isn't marked as saved, so when you want to close it, VSC asks if you want to save the file locally which adds just a little extra friction every time you pull a page to edit in VSC. It should be marked as saved when you push, so VSC doesn't ask you to save the page locally, or there could be an option to automatically close the tab when you push since pushing usually means you're done editing that page, though I can see the use-case where you'd want to keep it open just in case you misspelled something or needed another minor edit like that.

The default save keybind is mostly useless for me when the editor lang is wikitext - I'll never need to locally save the page if I'm pushing up to a wiki, all the edit history is saved on the wiki - So as described in #37, I'm using multi-command with a custom command in keybindings.json set to override the ctrl+s keybind when the editor lang is wikitext. However, since the tab doesn't get marked as saved after push, trying to close it with workbench.action.closeActiveEditor in my multicommad sequence makes the confirmation popup appear.

I might try to consider adding a command to forcefully close the page to solve the problem. Practices marked as saved will conflict with the local storage function.