Skip to content

Instantly share code, notes, and snippets.

@RednibCoding
Last active October 20, 2019 21:46
Show Gist options
  • Save RednibCoding/c35821e61a21cdcfcfc629b9ef52083c to your computer and use it in GitHub Desktop.
Save RednibCoding/c35821e61a21cdcfcfc629b9ef52083c to your computer and use it in GitHub Desktop.
Modern keybindings for the nano editor
# Copy/paste the following lines into the "nanorc" file
# File is usually located at: /etc/nanorc
# Set some colors
# set element fgcolor,bgcolor
set titlecolor black,green
set statuscolor black,green
set errorcolor brightwhite,red
set selectedcolor black,green
set stripecolor ,yellow
set numbercolor green
set keycolor cyan
set functioncolor green
# Set some functions
set mouse
set autoindent
set linenumbers
set morespace
set multibuffer
#set nohelp # perhaps comment out until comfortable
set quickblank
set regexp
set smooth
set suspend
set tabsize 4
# Set keybindings
unbind ^K main
unbind ^U main
unbind ^W main
bind ^O insert main
bind ^S writeout main
bind ^Q exit main
bind ^A help main
bind ^P prevword main
bind ^N nextword main
bind ^B firstline main
bind ^E lastline main
bind ^L gotoline main
bind ^J curpos main
bind ^Space mark main
bind ^X cut main
bind ^C copytext main
bind ^V paste main
bind ^F whereis main
bind ^G searchagain main
bind ^H replace main
bind ^Z undo main
bind ^Y redo main
bind M-A nohelp main
bind M-L constupdate main
bind M-Z suspend main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment