fix(hotkeys): removing default hotkeys

This commit is contained in:
EloiMusk 2023-03-16 07:48:44 +01:00
parent b309c68473
commit 02fdcc0ba8
No known key found for this signature in database
GPG key ID: A59863E13934DD4F
4 changed files with 9 additions and 32 deletions

32
main.ts
View file

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

View file

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

View file

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

View file

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