feat: Enter/Shift+Enter and Cmd+g/Cmd+Shift+g to jump to the next/prev

This commit is contained in:
Tienson Qin
2022-08-24 10:42:43 +08:00
parent 322e3a730a
commit c919b61c07
5 changed files with 54 additions and 39 deletions

View File

@@ -253,6 +253,16 @@
:fn #(when (util/electron?)
(search-handler/open-find-in-page!))}
:go/electron-jump-to-the-next {:binding ["enter" "mod+g"]
:fn (fn [_state _e]
(when (util/electron?)
(search-handler/loop-find-in-page! false)))}
:go/electron-jump-to-the-previous {:binding ["shift+enter" "mod+shift+g"]
:fn (fn [_state _e]
(when (util/electron?)
(search-handler/loop-find-in-page! true)))}
:go/journals {:binding "g j"
:fn route-handler/go-to-journals!}
@@ -284,7 +294,7 @@
:graph/open {:fn #(do
(editor-handler/escape-editing)
(state/set-state! :ui/open-select :graph-open))
:binding "mod+shift+g"}
:binding "alt+shift+g"}
:graph/remove {:fn #(do
(editor-handler/escape-editing)
@@ -506,6 +516,8 @@
:go/search-in-page
:go/search
:go/electron-find-in-page
:go/electron-jump-to-the-next
:go/electron-jump-to-the-previous
:go/backward
:go/forward
:search/re-index
@@ -559,6 +571,8 @@
:go/search
:go/search-in-page
:go/electron-find-in-page
:go/electron-jump-to-the-next
:go/electron-jump-to-the-previous
:editor/undo
:editor/redo
:editor/copy