-
Notifications
You must be signed in to change notification settings - Fork 330
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
Richer rendering in editor, such as showing link text only (hiding destination) while not under cursor #929
Comments
Implementing a WYSIWYG editor in VS Code's normal text editor is indeed not possible. Such support requires at least a Webview is confusingly weird sometimes: Not to mention complex text layout and event handling. |
We have received a great number of similar requests. Usually, we recommend that you turn to an existing solution like Typora and Caret. Zettlr that you mentioned above gives us a new understanding of this issue. Thank you. For now, we are working hard to improve editor decoration and semantic tokenization to mimic such things. |
Maybe we could upvote/reopen my ticket here: microsoft/vscode#119897 We should ask for supporting richer rendering in the plain editor window, including:
|
Sounds good. Should be related to: |
Found https://marketplace.visualstudio.com/items?itemName=TobiasTao.vscode-md several weeks ago, which embeds a Markdown editor in the Webview. The only question is: why bother using VS Code 🤣. (In this way it loses all features from VS Code) |
Happened to discover a demo: Markdown Notebook ( This implies that it's possible to merge editor and preview into one view via the Notebook API to have a pseudo-WYSIWYG editor. 😂 The approach requires lots of tedious work, but might be slightly easier than adding more crazy things to the normal text editor. To make the best of the Notebook, IMO, we have to restrict Markdown syntax to ensure isolation so that each block can be edited independently. Here are a few thoughts. The following structures should be disallowed. If a document contains any of them, the notebook should refuse to open it. If a user tries to insert any of them, the notebook should refuse the input.
Serialization should enforce normalization on structures in the document root.
I haven't come up with an idea to handle comments robustly. |
Proposal
Side by side editing/rendering has its limitations. It costs much screen real estate and its not very convenient for real-time editing (you can't watch at your cursor in the editor and the renderer at the same time).
For that reason, I prefer doing everything in the editor without opening a renderer next to it. But that leaves some things in the editor a bit annoying. My most common issues is with long links having a very negative effect on the readability in the raw editor. But same can hold for images and equations for people who use those a lot.
I personally like it to make raw what's under cursor, but render it as soon as it's not under cursor. That's what a mardkown editor like Zettlr does.
See this example of how Zettlr handles links:
It would be great if we can support such rendering (as an opt-in setting?) in this plugin!
References
Zettlr.
For more details, see my original VS Code request here: microsoft/vscode#119897
I used to think this kind of rendering wasn't possible for extensions to do in a normal editor pane, as I thought extensions can't edit a plain text window apart from decorating character positions (changing things like color/bold/italic). But the answer on that VS Code issue seems to suggest that this is already possible. If it's actually not possible, then we should follow up on microsoft/vscode#119897 to clarify that this is an actual limitation... Would be great if the author of this plug-in could weigh in on that discussion is needed.
The text was updated successfully, but these errors were encountered: