Text-expander
A bare-bones proof-of-concept implementation of a simple text-expander in Obsidian.
- Uses
::(two colons) to start the trigger-sequence - Define your own custom trigger keyword like
foo - In the editor, type ::foo + ENTER (or Tab or Space) to expand
Built-in is ::date which will expand to todays date such as Mon Nov 09 2020 and ::time which will expand to your current timezone's time.
Demo
Settings
Hacking and Help
This is mostly a proof of concept for myself and it's rather, erm, "pragmatic" code. If you see something you'd like to change, let me know. Here's how you can fiddle around on your own yourself and send a pull-request
Clone and make new branch
cd $VAULT/.obsidian/pluginsgit clone https://github.com/akaalias/text-expander-plugincd text-expander-plugingit checkout -b my_branchgit remote add upstream https://github.com/akaalias/text-expander-plugin
Install deps
npm i && npm install -g prettier && npm install -g eslintnpm run dev
Edit
git checkout -b my_branch- Make your edits
- To check your changes, reload Obsidian (Command-R)
Commit-prep
./ship.shwill prettify and elsint once againgit add -pto stage changes individuallygit commit -m "my message"
Publish pull request
git push -u origin my_branch

