Ctrl-XA cycle various items
approvedby nbossard
Cycle through various items with keyboard shortcuts. Such as days, months, true-false, log level,... anything you need.
Ctrl XA Plugin
Inspired by vim plugin : https://github.com/Konfekt/vim-CtrlXA
This Obsidian plug-in allows easy cycle through lists of keywords such as for example:
- Monday/Tuesday/Wednesday/...
- true/false
- yes/no
- set/unset
- yesterday/today/tomorrow
- roman numerals I, II, III...
It also automatically increases/decreases numbers and dates.
Usage
Install and enable this plugin.
Go to settings of plugin, fill the lists you need.
Go to settings/hotkeys, define hotkeys for commands "Ctrl-XA cycle various items: Cycle up" and "Ctrl-XA cycle various items: Cycle Down", could be Ctrl-X and Ctrl-A (like in Vim), or any key you want...
You are ready to use it:
- please input a sentence like "Will do it on Monday"
- place your cursor on "Monday"
- press hotkey you defined for cycle up.
- sentence is now "Will do it on Tuesday"
What's new
Refer to changelog
Various
Note: this plugin has been started using https://github.com/obsidianmd/obsidian-sample-plugin
Manual installation
This is to get latest version in development.
Go to the folder containing your vault, then in subfolder ".obsidian/plugins". Git clone there the repo : https://github.com/nbossard/obsidian-CtrlXA. Restart Obsidian.
Releasing process
- check content of changelog.md and add release date
- check content of versions.json
- check "version" field in manifest.json
- check "version" field in package.json
- check everything is saved and commited
- git tag and push
- let github actions generate the new draft release https://github.com/nbossard/obsidian-CtrlXA/actions
- go to release page https://github.com/nbossard/obsidian-CtrlXA/releases edit latest draft and publish it
- bump version number in "CHANGELOG.md", "versions.json", "manifest.json", "package.json"
- save stage and commit
Development environment
tools
- don't forget to npm install
- open another terminal running
npm run dev - developped using neovim
- Plugin obsidian "Hot Reload" also helped a lot https://github.com/pjeby/hot-reload
Code principles
- "happy path is left aligned"
- test as much as possible, using jest.
branches
Apparently Obsidian is checking content of manifest.json on "main" branch to detect for new versions. So "main" branch will now contain only releases and work will be done in "develop" branch.
github actions
This project uses "github actions" to generate (draft) releases out of tags. This is configured in file release.yml Refer to documentation: https://docs.github.com/en/actions
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.