This commit is contained in:
Spencer Gouw 2023-08-31 00:22:13 -05:00
commit 56dd23b30d

View file

@ -1,6 +1,9 @@
# jelly-snippets
A simple text snippets plugin for Obsidian.md.
## BEFORE UPDATING,READ:
If you have used an older version of this plugin (1.5) or below, updating to version 1.6 will erase your snippets. Backup your snippets before updating; I will update the plugin with a backup functionality later too in case I mess up again. Deepest apologies.
## What does it do?
@ -76,13 +79,13 @@ It's since been incorporated back into [julia.vim](https://github.com/JuliaEdito
## Future Improvements/TODO
- [ ] Control characters in snippets (e.g. whitespace, particularly newlines? currently snippets are trimmed on both ends; should probably not trim spaces)
- [ ] Control characters in snippets
- [ ] Semantic symbols in snippets (e.g. where does cursor go afterwards? a snippet with braces might benefit from placing the cursor inside...)
- [ ] Regex capabilities
- [ ] Regex capabilities - at least on selection.
- [ ] A backup for snippets - or a way of specifying snippets in a file, to modularize snippets. May be useful if regex snippets need to be defined separately from text snippets.
- [ ] Bugfixes and auditing?
- [x] Add newline option for snippet definition to make simple snippets easy rather than cumbersome
- [ ] Do the things liamcain suggested in my plugin PR to the Obsidian plugin repo. (one half done)
### Other caveats
- The lhs of a snippet (currently) cannot have newlines in it. Snippets of that sort will simply fail to work; they'll register but never trigger. The reason why is because I only search from cursor to start of line for snippet text; this is efficient and simple. To fix, we'd have to look backwards from the cursor position and match with the lhs of the snippet. Probably not a hard update, but given that this use case is somewhat rare (imo), I have neglected it. Do submit an issue. EDIT: the issue was submitted. Time to get to work.
- None right now, except that the maintainer of this plugin (me) is inexperienced and may break something. Keep your snippets safe if you write a lot of them.