Obsidian / Tokenz
Use your favourite symbols, special characters and frequently used snippets with ease!
You can insert them to your document using short code mappings:
- Built-in short code maps:
- emojis, like
:smile:
🙂 or:wink:
😉 (1800+ installed by default),
and the classic, good old - smileys, like
:-)
🙂,8-D
😎 (installed by default)
- emojis, like
- User defined short code maps. You can use any format you’d like:
/prog-50
▋,.success
🏆,!movie
🎥 For further explanation and a short configuration guide see 2. User defined code maps .
Demo video showing the features:
Configuration
1. Installation
1.1 From Obsidian’s Community plugin collection
Suggested method, the easiest way to install:
- Open settings (Gear icon)
- Click Options / Community plugins / Community plugins, Browse… button
- Search for “Tokenz”
- Install and Enable
- Start typing some pre-installed token, e.g.
:)
1.2 From sources
It’s also possible to install it manually:
- Get the sources:
git clone https://github.com/ferenk/obsidian-tokenz
- Init the sources folder:
cd obsidian-tokenz; npm install
- Build the plugin:
npm run build
- Create a folder in your Obsidian wallet:
mkdir <your wallet's path>/.obsidian/plugins/tokenz
- Copy the plugin’s files main.js, manifest.json, styles.css into the folder just created
- Restart Obsidian and enable the “Tokenz” plugin
- Start typing
:)
2. User defined code maps
It’s easy to define your own code maps. You can choose any format for your short codes (tokens). But you can also mix different formats (see 4.).
- Choose a name for your code map, e.g my code map
- Create a folder named data in <Your wallet’s path>/.obsidian/plugins/tokenz
- Create an index file of the code maps in the data folder just created. It’s name must be maps.lst.
Example data/maps.lst:my_code_map.json
- Create your own code map file. Its structure is very simple, for example here are are the codes for our sample paragraph
(it also demonstrates the mixed usage of different token formats)
Example my_code_map.json to enter the sample lines{ "/prog-20": "▎", "/prog-50": "▋", "/prog-80": "▉", ".success": "🏆", ".idea": "💡", "|tv_episode|": "📺", "!movie": "🎥" }
And now you can insert these symbols to your document this way:
Format | Short code example | Result |
---|---|---|
IRC style | /prog-20 20%, /prog-50 /prog-90 90% |
=> ▎ 20%, ▋ 50%, █ 90% |
CSS class | .idea, .success |
=> 💡, 🏆 |
Any “crazy” style | |tv_episode| |
=> 📺 |