Nano Keybindings
Linux console text editors mostly remain obtuse for many users. There is some hope. Some newer editors such as micro
seem designed to be more palatable. The nano
text editor has risen in popularity the past few years, but the default keyboard bindings do not follow the Common User Access (CUA) design of GUI editors. Fortunately, users can modify the interface.
Here is one example of a custom $HOME/.nanorc
:
set atblanks set autoindent set boldtext set constantshow set cutfromcursor set indicator set linenumbers set magic set minibar set mouse set showcursor set softwrap set speller "aspell -x -c" set tabsize 2 set tabstospaces set trimblanks set whitespace "»·" set zap set multibuffer set titlecolor bold,lightwhite,blue set promptcolor lightwhite,lightblack set statuscolor bold,lightwhite,green set errorcolor bold,lightwhite,red set spotlightcolor black,lime set selectedcolor lightwhite,magenta set stripecolor ,yellow set scrollercolor cyan set numbercolor cyan set keycolor cyan set functioncolor green include "/usr/share/nano/*.nanorc" bind ^Q exit all bind ^S savefile main bind ^W writeout main bind ^O insert main bind ^H help all bind ^H exit help bind ^F whereis all bind ^G findnext all bind ^B wherewas all bind ^D findprevious all bind ^R replace main bind ^X cut main bind ^C copy main bind ^V paste all bind ^P location main bind ^E execute main bind ^A mark main unbind ^K main unbind ^U all unbind ^N main unbind ^Y all unbind M-J main unbind M-T main bind ^T gotoline main bind ^T gotodir browser bind ^T cutrestoffile execute bind ^L linter execute bind M-U undo main bind M-R redo main bind ^Z undo main bind ^Y redo main
The following changes might be helpful when running nano as root:
set titlecolor bold,lightwhite,red set promptcolor black,yellow set statuscolor bold,lightwhite,magenta set spotlightcolor black,orange set selectedcolor lightwhite,cyan set scrollercolor magenta set numbercolor magenta set keycolor lightmagenta set functioncolor magenta
Posted: Usability Tagged: General
Category:Next: KDE Activity Manager
Previous: Tweaking the Thinkpad T580