-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to close preview while editor losting focus #2
Comments
Thank you @neilsustc
Great news, I like that feature. |
You can find more details about that feature in #22068.
But I think it will probably take a long time to finish. 😂 I've published v0.5.1 with a temporary solution. |
@neilsustc v0.5.1 is not strong. Sometime it kept preview editor and closed other editors. I think it should rollback to v0.5.0. Then let's wait for improvement of markdown extention. |
Could you provide any reproduction steps? |
@neilsustc OK, the steps are simple.
|
I'll rollback to v0.5.0 as there is another user that also found this bug. |
Hello, BTW, thanks great plugin ! |
To my knowledge, we can't. Because vscode doesn't provide API to close a editor by name/id. |
Thanks for the reply... |
I get your point now 😂. Yes, it's possible, but really dangerous 🤣. |
I tried and as expected it is very unstable and annoying. You won't like it. |
This would be an awesome feature. Any chance the API changed since your last tentative? Maybe opening a feature request in https://github.com/microsoft/vscode otherwise? |
To my knowledge, no new APIs 😔 I would suggest posting this "auto-closing" feature request to vscode (rather than API) because the Markdown preview feature is actually implemented by vscode. We have little control over it as an extension. |
Well they still haven't implemented auto-hide of the terminal after all those years and lots of votes, not a good sign 😅 |
Also if I drag an .md file into VSCode with other files already open it does enable the preview on the right but then immediately switches the editor back to the previous one. Has anyone else experienced this? |
Is there any progress on automatically close the preview tab when editor is close? |
I don't know how but they managed to do it here: markdown-auto-preview. It even has an option for closing it when changing file (which I think should be default).
@yzhang-gh maybe you can understand what's being done there and do here as well. |
When I was editing a markdown file, I need preview. But when I switch to another editor(such as a js code editor) I hope no markdown preview window appear.
So I hope when I switch to another editor, the markdown preview editr(window) can be closed automatically. If I switch back to the markdown editor, the preview window is opened to side again.
Can you implement that?
The text was updated successfully, but these errors were encountered: