From 9695392358b73b03c3efd1b8ea6185f7fad124a2 Mon Sep 17 00:00:00 2001 From: asnev Date: Thu, 5 Nov 2026 14:54:30 +0700 Subject: [PATCH] nano preferences --- modules/programs/nano.nix | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/modules/programs/nano.nix b/modules/programs/nano.nix index 2184256..484f6b5 100644 --- a/modules/programs/nano.nix +++ b/modules/programs/nano.nix @@ -5,6 +5,7 @@ package = pkgs.unstable.nano; syntaxHighlight = true; nanorc = '' + # nano preferences (alphabetical) set atblanks set autoindent set casesensitive @@ -24,31 +25,37 @@ set tabsize 4 set tabstospaces set trimblanks - - bind M-F nextword main - bind M-B prevword main - + # search keybinds: editor unbind ^S main bind ^S whereis main bind Sh-M-F findnext main bind Sh-M-B findprevious main - + # search keybinds: file browser unbind ^S browser bind ^S whereis browser bind Sh-M-F findnext browser bind Sh-M-B findprevious browser - - bind ^S whereis help - bind Sh-M-F findnext help - bind Sh-M-B findprevious help - + # text copying (killing) from editor + unbind M-K main + bind M-K copy main + bind Sh-M-K cutfromcursor main + # copy from editor into system (Wayland) clipboard bind Sh-M-C "{execute}| wl-copy > /dev/null 2>&1 {enter}{exit}n" main - + # insert lambda into editor + unbind ^\ main + bind ^\ "λ" main + # center/raise/lower cursor position in editor + unbind ^L main + bind ^L cycle main + # editor cursor navigation by word boundaries (a la Emacs) + bind M-F nextword main + bind M-B prevword main + # editor cursor navigation horizontally bind ^F forward main bind ^B back main bind ^F forward browser bind ^B back browser - + # editor buffer navigation bind M-< prevbuf main bind M-> nextbuf main '';