mirror of
https://github.com/heyman/heynote.git
synced 2025-06-27 13:01:51 +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.
|
||||
- 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
|
||||
|
@ -9,6 +9,7 @@ import {
|
||||
simplifySelection,
|
||||
splitLine,
|
||||
insertNewlineAndIndent,
|
||||
toggleComment, toggleBlockComment, toggleLineComment,
|
||||
} from "@codemirror/commands"
|
||||
import { foldCode, unfoldCode } from "@codemirror/language"
|
||||
import { selectNextOccurrence } from "@codemirror/search"
|
||||
@ -140,6 +141,9 @@ const HEYNOTE_COMMANDS = {
|
||||
transposeChars: cmdLessContext(transposeChars, "Edit", "Transpose characters"),
|
||||
insertNewlineAndIndent: cmdLessContext(insertNewlineAndIndent, "Edit", "Insert newline and indent"),
|
||||
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
|
||||
|
@ -87,6 +87,9 @@ export const DEFAULT_KEYMAP = [
|
||||
|
||||
cmd("Alt-Shift-f", "formatBlockContent"),
|
||||
|
||||
cmd("Mod-/", "toggleComment"),
|
||||
cmd("Alt-Shift-a", "toggleBlockComment"),
|
||||
|
||||
// search
|
||||
//cmd("Mod-f", "openSearchPanel"),
|
||||
//cmd("F3", "findNext"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user