Compare commits

...

4 commits

Author SHA1 Message Date
Tekknoman
4ca40b78bd
Update LICENSE 2025-04-03 12:58:47 +02:00
EloiMusk
625f6f194b
chore(version): version bump to 1.0.2 2023-03-16 08:20:51 +01:00
EloiMusk
8e8f100028
doc(usage): changing usage documentatoin 2023-03-16 08:07:56 +01:00
EloiMusk
02fdcc0ba8
fix(hotkeys): removing default hotkeys 2023-03-16 07:48:44 +01:00
6 changed files with 23 additions and 50 deletions

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2023 Elio Teuber
Copyright (c) 2023 Tekknoman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -18,21 +18,17 @@ You can install the Prioritize plugin via the Community Plugin Browser in Obsidi
## Usage
1. After installing and configuring the plugin, you can mark any note or task with a priority level.
2. To mark something with medium priority, select the text you want to prioritize and press `ctrl+shift+alt+p`.
3. The text will be marked with a tag that corresponds to the priority level at the end of the line.
4. You can customize the number of priority levels and their names via the plugin settings.
5. You can switch between different presets and create your own presets.
6. To remove priority, press `ctrl+shift+alt+d`.
7. To increase priority, press `ctrl+shift+alt+ArrowUp`.
8. To decrease priority, press `ctrl+shift+alt+ArrowDown`.
After installing and configuring the plugin, you can prioritize notes or tasks by selecting the text you want to prioritize and choosing from different priority levels. You can configure the number of levels and assign a name for each level of priority in the plugin settings. Once you have set your preferences, you can easily switch between different presets or create your own.
Here is a list of all the available actions:
- `Set Priority`: Mark selected text with a priority level.
- `Remove Priority`: Remove a previously set priority level.
- `Increase Priority`: Increase the priority level of selected text.
- `Decrease Priority`: Decrease the priority level of selected text.
To use these actions, you can either access them from the Command Palette or create a hotkey for each action.
| HotKeys | Action |
|--------------------|-------------------|
| `ctrl+shift+alt+p` | Set priority |
| `ctrl+shift+alt+d` | Remove priority |
| `Ctrl+Shift+Alt+↑` | Increase priority |
| `Ctrl+Shift+Alt+↓` | Decrease priority |
### Configuration
In the settings tab, you can configure the Prioritize plugin to your liking. This includes setting the number of levels of priority and assigning a name for each level. To save your configuration, you need to click the `Save` button.
@ -51,9 +47,8 @@ If you'd like to contribute to the Prioritize plugin, please fork the GitHub rep
The Prioritize plugin is released under the GNU License.
## Improve code quality with eslint (optional)
- [ESLint](https://eslint.org/) is a tool that analyzes your code to quickly find problems. You can run ESLint against your plugin to find common bugs and ways to improve your code.
- To use eslint with this project, make sure to install eslint from terminal:
- `npm install -g eslint`

32
main.ts
View file

@ -42,13 +42,7 @@ export default class PrioPlugin extends Plugin {
name: 'Set priority',
editorCallback: (editor: Editor, view: MarkdownView) => {
setPrio(editor, view, this.settings);
},
hotkeys: [
{
modifiers: ['Ctrl', 'Shift', 'Alt'],
key: 'p',
}
]
}
});
this.addCommand({
@ -56,13 +50,7 @@ export default class PrioPlugin extends Plugin {
name: 'Remove priority',
editorCallback: (editor: Editor, view: MarkdownView) => {
removePrio(editor, view, this.settings);
},
hotkeys: [
{
modifiers: ['Ctrl', 'Shift', 'Alt'],
key: 'd',
}
]
}
})
this.addCommand({
@ -70,13 +58,7 @@ export default class PrioPlugin extends Plugin {
name: 'Increase priority',
editorCallback: (editor: Editor, view: MarkdownView) => {
increasePrio(editor, view, this.settings);
},
hotkeys: [
{
modifiers: ['Ctrl', 'Shift', 'Alt'],
key: 'ArrowUp',
}
]
}
});
// This adds a complex command that can check whether the current state of the app allows execution of the command
this.addCommand({
@ -84,13 +66,7 @@ export default class PrioPlugin extends Plugin {
name: 'Decrease priority',
editorCallback: (editor: Editor, view: MarkdownView) => {
decreasePrio(editor, view, this.settings);
},
hotkeys: [
{
modifiers: ['Ctrl', 'Shift', 'Alt'],
key: 'ArrowDown',
}
]
}
});
// This adds a settings tab so the user can configure various aspects of the plugin

View file

@ -1,11 +1,11 @@
{
"id": "prioritize",
"name": "Prioritize",
"version": "1.0.0",
"version": "1.0.2",
"minAppVersion": "0.15.0",
"description": "Prioritize your tasks and notes in Obsidian.",
"author": "EloiMusk",
"authorUrl": "https://github.com/EloiMusk/",
"fundingUrl": "https://www.buymeacoffee.com/eloimusk",
"isDesktopOnly": true
}
}

View file

@ -1,6 +1,6 @@
{
"name": "obsidian-sample-plugin",
"version": "1.0.0",
"version": "1.0.2",
"description": "This is a sample plugin for Obsidian (https://obsidian.md)",
"main": "main.js",
"scripts": {

View file

@ -1,3 +1,5 @@
{
"1.0.0": "0.15.0"
}
"1.0.1": "0.15.0",
"1.0.0": "0.15.0",
"1.0.2": "0.15.0"
}