## ~/.nanorc: nano 5.x user config ## syntax highlighting include ~/.local/share/nano/*.nanorc ## editor unset jumpyscrolling set softwrap set fill 79 set tabsize 4 set autoindent set wordchars "$-:._" set matchbrackets "(<[{)>]}" set trimblanks set afterends set atblanks set unix ## convenience unset locking set positionlog unset historylog ## keybinds bind ^Z undo main ## disable Ctrl+S to save unbind ^S main ## keybind macros ## use M-V to insert keystroke literals ## execute current line ## cut current line, execute as shell command, paste output underneath ## allows shell commands within inline comments ## but not /* single-line C-style comments */ bind M-1 " echo "" | sed -E 's,^[#*\\/; ]+? (.*),\1,g' | sh " main ## jump to ctags definition ## move cursor to right of word, mark to beginning, copy marked region, ## paste cutbuffer as search token for nano-overlay --ctags mode, ## opens matches in a sub-shelled nano instance bind M-2 "6nano-overlay -e '' 1>&0 2>&0 " main ## opens matches in a new terminal window as a background nano instance bind M-4 "6visual nano-overlay -e '' & " main ## execute formatter (DESTRUCTIVE!) ## cut current line, execute as shell command, accept buffer as stdin, ## return to top of buffer, paste original line bind M-0 " | \" main ## ui set emptyline set nohelp set constantshow unset linenumbers set indicator ## color scheme set titlecolor black,cyan set statuscolor black,white set errorcolor black,red set numbercolor lightblack set scrollercolor lightblack set keycolor bold,blue set functioncolor white set stripecolor lightblack,black