commit 2c1880a391a2ce43e96146df9188f6bd71dc66bb
parent e3ffb024672db87264fd6a0e546f3cf2ca5dc21f
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Thu, 21 Aug 2025 21:32:24 +0200
parent e3ffb024672db87264fd6a0e546f3cf2ca5dc21f
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Thu, 21 Aug 2025 21:32:24 +0200
config/home-manager/zaphyra/programs/micro: add keybindings
1 file changed, 117 insertions(+), 1 deletion(-)
M
|
118
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
diff --git a/config/home-manager/zaphyra/programs/micro.nix b/config/home-manager/zaphyra/programs/micro.nix @@ -26,6 +26,8 @@ "*.nim".tabmovement = true; "*.nim".tabsize = 2; + clipboard = "terminal"; + scrollbar = true; eofnewline = false; wordwrap = true; @@ -66,8 +68,122 @@ }; }; - # plugins home.file = { + # keybindings + "${config.xdg.configHome}/micro/bindings.json".source = pkgs.writeText "micro-keybindings.json" (builtins.toJSON { + "Alt-," = "PreviousTab"; + "Alt-." = "NextTab"; + "Alt-Backspace" = "DeleteWordLeft"; + "Alt-CtrlH" = "DeleteWordLeft"; + "Alt-F" = "FindLiteral"; + "Alt-[" = "DiffPrevious|CursorStart"; + "Alt-]" = "DiffNext|CursorEnd"; + "Alt-a" = "StartOfLine"; + "Alt-b" = "WordLeft"; + "Alt-c" = "RemoveAllMultiCursors"; + "Alt-e" = "EndOfLine"; + "Alt-f" = "WordRight"; + "Alt-g" = "ToggleKeyMenu"; + "Alt-m" = "SpawnMultiCursorSelect"; + "Alt-n" = "SpawnMultiCursor"; + "Alt-p" = "RemoveMultiCursor"; + "Alt-x" = "SkipMultiCursor"; + "Alt-{" = "ParagraphPrevious"; + "Alt-}" = "ParagraphNext"; + "AltDown" = "MoveLinesDown"; + "AltLeft" = "StartOfTextToggle"; + "AltRight" = "EndOfLine"; + "AltShiftDown" = "SpawnMultiCursorDown"; + "AltShiftLeft" = "SelectToStartOfTextToggle"; + "AltShiftRight" = "SelectToEndOfLine"; + "AltShiftUp" = "SpawnMultiCursorUp"; + "AltUp" = "MoveLinesUp"; + "Backspace" = "Backspace"; + "Backtab" = "OutdentSelection|OutdentLine"; + "Ctrl-MouseLeft" = "MouseMultiCursor"; + "Ctrl-a" = "SelectAll"; + "Ctrl-b" = "ShellMode"; + "Ctrl-c" = "Copy|CopyLine"; + "Ctrl-d" = "DuplicateLine"; + "Ctrl-e" = "CommandMode"; + "Ctrl-f" = "Find"; + "Ctrl-g" = "ToggleHelp"; + "Ctrl-h" = "Backspace"; + "Ctrl-j" = "PlayMacro"; + "Ctrl-k" = "CutLine"; + "Ctrl-l" = "command-edit:goto "; + "Ctrl-n" = "FindNext"; + "Ctrl-o" = "OpenFile"; + "Ctrl-p" = "FindPrevious"; + "Ctrl-q" = "Quit"; + "Ctrl-r" = "ToggleRuler"; + "Ctrl-s" = "Save"; + "Ctrl-t" = "AddTab"; + "Ctrl-u" = "ToggleMacro"; + "Ctrl-v" = "Paste"; + "Ctrl-w" = "NextSplit"; + "Ctrl-x" = "Cut|CutLine"; + "Ctrl-y" = "Redo"; + "Ctrl-z" = "Undo"; + "CtrlDown" = "CursorEnd"; + "CtrlEnd" = "CursorEnd"; + "CtrlHome" = "CursorStart"; + "CtrlPageDown" = "NextTab"; + "CtrlPageUp" = "PreviousTab"; + "AltPageDown" = "NextTab"; + "AltPageUp" = "PreviousTab"; + "CtrlShiftDown" = "SelectToEnd"; + "CtrlShiftLeft" = "SelectWordLeft"; + "CtrlShiftRight" = "SelectWordRight"; + "CtrlShiftUp" = "SelectToStart"; + "CtrlUp" = "CursorStart"; + "Delete" = "Delete"; + "Down" = "CursorDown"; + "End" = "EndOfLine"; + "Enter" = "InsertNewline"; + "Esc" = "Escape"; + "F10" = "Quit"; + "F2" = "Save"; + "F3" = "Find"; + "F4" = "Quit"; + "F7" = "Find"; + "Home" = "StartOfText"; + "Insert" = "ToggleOverwriteMode"; + "Left" = "CursorLeft"; + "MouseLeft" = "MousePress"; + "MouseLeftDrag" = "MouseDrag"; + "MouseLeftRelease" = "MouseRelease"; + "MouseMiddle" = "PastePrimary"; + "MouseWheelDown" = "ScrollDown"; + "MouseWheelUp" = "ScrollUp"; + "PageDown" = "CursorPageDown"; + "PageUp" = "CursorPageUp"; + "Right" = "CursorRight"; + "ShiftDown" = "SelectDown"; + "ShiftEnd" = "SelectToEndOfLine"; + "ShiftHome" = "SelectToStartOfTextToggle"; + "ShiftLeft" = "SelectLeft"; + "ShiftPageDown" = "SelectPageDown"; + "ShiftPageUp" = "SelectPageUp"; + "ShiftRight" = "SelectRight"; + "ShiftUp" = "SelectUp"; + "Tab" = "Autocomplete|IndentSelection|InsertTab"; + "Up" = "CursorUp"; + + # plugins + "Alt-/" = "lua:comment.comment"; + "Alt-d" = "command:definition"; +# "Alt-f" = "command:format"; + "Alt-k" = "command:hover"; + "Alt-r" = "command:references"; + "CtrlSpace" = "command:lspcompletion"; + "CtrlUnderscore" = "lua:comment.comment"; + "F1" = "command:cheat"; +# "F4" = "command:jumptag"; + "F5" = "lua:wc.wordCount"; + }); + + # plugins "${config.xdg.configHome}/micro/plug/lsp".source = pkgs.fetchFromGitHub { owner = "AndCake"; repo = "micro-plugin-lsp";