From 6a853dfa1260b020d47abd216a8fd9e34fbb9116 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Mon, 5 Jul 2021 14:42:53 +0200 Subject: [PATCH] find-replace + alt-arrow commands --- TODO | 11 +++++++---- data/core/keymap.lua | 10 +++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index fcbe587..cb19f52 100644 --- a/TODO +++ b/TODO @@ -19,15 +19,18 @@ [ ] optimize dir tree taking too long to load on big folders [ ] go in background when launching from terminal [ ] some key bindings: - [ ] alt+right == End - [ ] alt+left == Home - [ ] alt+up == PageUp - [ ] alt+down == PageDown + [x] alt+right == End + [x] alt+left == Home + [x] alt+up == PageUp + [x] alt+down == PageDown [ ] ctrl+d == duplicate line [ ] ctrl+x == cut line || selection [ ] ctrl+c == copy line || selection [ ] ctrl+shift+o == change & open project folder -> core:open-project-module [x] ctrl+q == quit + [x] ctrl+n -> next_find + [x] ctrl+shift+n -> prev_find + [x] f3 -> new file [x] change alt+ to ctrl+ [ ] add multi cursor system [ ] add binding to open up a cheatsheet of keybinding, with a diff --git a/data/core/keymap.lua b/data/core/keymap.lua index 1ede11b..a8aef37 100644 --- a/data/core/keymap.lua +++ b/data/core/keymap.lua @@ -87,7 +87,7 @@ keymap.add { ["ctrl+shift+p"] = "core:find-command", ["ctrl+p"] = "core:find-file", ["ctrl+o"] = "core:open-file", - ["ctrl+n"] = "core:new-doc", + ["f3"] = "core:new-doc", ["alt+return"] = "core:toggle-fullscreen", ["ctrl+q"] = "core:quit", @@ -117,8 +117,8 @@ keymap.add { ["ctrl+f"] = "find-replace:find", ["ctrl+r"] = "find-replace:replace", - ["f3"] = "find-replace:repeat-find", - ["shift+f3"] = "find-replace:previous-find", + ["ctrl+n"] = "find-replace:repeat-find", + ["ctrl+shift+n"] = "find-replace:previous-find", ["ctrl+g"] = "doc:go-to-line", ["ctrl+s"] = "doc:save", ["ctrl+shift+s"] = "doc:save-as", @@ -163,6 +163,10 @@ keymap.add { ["ctrl+]"] = "doc:move-to-next-block-end", ["home"] = "doc:move-to-start-of-line", ["end"] = "doc:move-to-end-of-line", + ["alt+right"] = "doc:move-to-end-of-line", + ["alt+left"] = "doc:move-to-start-of-line", + ["alt+up"] = "doc:move-to-previous-page", + ["alt+down"] = "doc:move-to-next-page", ["ctrl+home"] = "doc:move-to-start-of-doc", ["ctrl+end"] = "doc:move-to-end-of-doc", ["pageup"] = "doc:move-to-previous-page",