mirror of
https://github.com/heyman/heynote.git
synced 2025-06-27 04:51:50 +02:00
Merge pull request #331 from heyman/fix-toggle-comment-keybinds
Fix key bindings for toggleComment and toggleBlockComment
This commit is contained in:
commit
38a3e3f46e
@ -8,6 +8,7 @@ Here are the most notable changes in each release. For a more detailed list of c
|
|||||||
|
|
||||||
- Fix issue where the second command in the command palette, instead of the first command, was selected when the palette is opened.
|
- Fix issue where the second command in the command palette, instead of the first command, was selected when the palette is opened.
|
||||||
- Change name/label of some commands in the command palette, and make commands searchable using their key names as well.
|
- Change name/label of some commands in the command palette, and make commands searchable using their key names as well.
|
||||||
|
- Fix key bindings for toggleComment and toggleBlockComment commands that were previously working.
|
||||||
|
|
||||||
|
|
||||||
## 2.2.0
|
## 2.2.0
|
||||||
|
@ -9,6 +9,7 @@ import {
|
|||||||
simplifySelection,
|
simplifySelection,
|
||||||
splitLine,
|
splitLine,
|
||||||
insertNewlineAndIndent,
|
insertNewlineAndIndent,
|
||||||
|
toggleComment, toggleBlockComment, toggleLineComment,
|
||||||
} from "@codemirror/commands"
|
} from "@codemirror/commands"
|
||||||
import { foldCode, unfoldCode } from "@codemirror/language"
|
import { foldCode, unfoldCode } from "@codemirror/language"
|
||||||
import { selectNextOccurrence } from "@codemirror/search"
|
import { selectNextOccurrence } from "@codemirror/search"
|
||||||
@ -140,6 +141,9 @@ const HEYNOTE_COMMANDS = {
|
|||||||
transposeChars: cmdLessContext(transposeChars, "Edit", "Transpose characters"),
|
transposeChars: cmdLessContext(transposeChars, "Edit", "Transpose characters"),
|
||||||
insertNewlineAndIndent: cmdLessContext(insertNewlineAndIndent, "Edit", "Insert newline and indent"),
|
insertNewlineAndIndent: cmdLessContext(insertNewlineAndIndent, "Edit", "Insert newline and indent"),
|
||||||
insertNewlineContinueMarkup: cmdLessContext(insertNewlineContinueMarkup, "Markdown", "Insert newline and continue todo lists/block quotes"),
|
insertNewlineContinueMarkup: cmdLessContext(insertNewlineContinueMarkup, "Markdown", "Insert newline and continue todo lists/block quotes"),
|
||||||
|
toggleComment: cmdLessContext(toggleComment, "Edit", "Toggle comment"),
|
||||||
|
toggleBlockComment: cmdLessContext(toggleBlockComment, "Edit", "Toggle block comment"),
|
||||||
|
toggleLineComment: cmdLessContext(toggleLineComment, "Edit", "Toggle line comment"),
|
||||||
}
|
}
|
||||||
|
|
||||||
// selection mark-mode:ify all cursor/select commands from CodeMirror
|
// selection mark-mode:ify all cursor/select commands from CodeMirror
|
||||||
|
@ -87,6 +87,9 @@ export const DEFAULT_KEYMAP = [
|
|||||||
|
|
||||||
cmd("Alt-Shift-f", "formatBlockContent"),
|
cmd("Alt-Shift-f", "formatBlockContent"),
|
||||||
|
|
||||||
|
cmd("Mod-/", "toggleComment"),
|
||||||
|
cmd("Alt-Shift-a", "toggleBlockComment"),
|
||||||
|
|
||||||
// search
|
// search
|
||||||
//cmd("Mod-f", "openSearchPanel"),
|
//cmd("Mod-f", "openSearchPanel"),
|
||||||
//cmd("F3", "findNext"),
|
//cmd("F3", "findNext"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user