-
Notifications
You must be signed in to change notification settings - Fork 327
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
Snippet editor tab #3870
base: master
Are you sure you want to change the base?
Snippet editor tab #3870
Conversation
Edit: oh, I see there is a whole new editor tab in addition to Brew, Styles, Properties. So nothing needs to indicate the end of a snippet because presumably each snippet would start with |
How is this different from using variables to insert blocks of text? (aside from the editor UI — which could be done for variables too/instead) |
Abstractly? Only that a menu exists. Practically? It is a better organizational scheme with semi-self-documentation via the menu. When I suggested creating user snippets via variables it got an unfavorable reaction. |
A variable could insert a block of text, but that block would not be editable. Example: say my theme introduces a new custom statblock for NPCs. It has a name, a table of stats, and some custom Making that into a snippet means a user of this theme can insert a nice example of this statblock, then manually edit the NPC's name, stats, etc. to match their use. If the only option is to put a variable This reveals the key difference: a variable enables easy duplication of a fixed text. A snippet enables easy insertion of a template text, intended to be filled out and edited. |
Can we get a deployment for this? @calculuschild |
I'm sure you are aware, but the deployment is not working atm |
Checking what I can |
unrelated error, fixed in #3911. |
Thanks! I was wondering about that! |
There's currently no styling for adding disabled to the class. What should it look like? |
…y into localSnippetEditor
I see two good options: With OR: |
I lean towards the first one. |
This adds brew-based user snippets.
This follows the document pattern using
snippet Snippet Name
instead of page to indicate the start of a snippet.A new
Brew Snippets
menu is added at the end of the existing menu list with Snippets organized under their owning document names (themeBundles return their snippets as well)To Do:
To test:
Example Snippet