Skip to content

Instantly share code, notes, and snippets.

@kig
Created July 29, 2020 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kig/da81c60a6068a2f97cd653834847489e to your computer and use it in GitHub Desktop.
Save kig/da81c60a6068a2f97cd653834847489e to your computer and use it in GitHub Desktop.
# Nano config file for minimalistic space-saving layout. Good for e.g. Termux.
# Turns line numbers on, hides help and other things.
# Multifile support on by default.
# Screws with the key bindings to make them more "standard"
#
# Close file is Ctrl-Q
# Open file is Ctrl-O
# Save As is Alt-S
# Cut/Copy/Paste are Ctrl-X/C/V
# Ctrl-Space starts selecting.
# Undo is Ctrl-Z, redo is Alt-Z.
# Find is Ctrl-F
# Replace is Ctrl-R
# Comment line with Alt-/
# Alt-Left/Right arrow skips words (the word boundary algo of nano is not so great though)
# Ctrl-W deletes a word
# Ctrl-A goes to the start of the current line
# Ctrl-E goes to the end of the current line
set linenumbers
set quickblank
set autoindent
set morespace
set multibuffer
set tabsize 4
set trimblanks
set nohelp
set boldtext
set tabstospaces
unbind M-B all
unbind M-F all
bind M-B prevword main
bind M-F nextword main
bind ^Space mark main
bind ^X cut main
bind ^C copy main
bind ^V paste main
bind ^Z undo main
bind M-Z redo main
bind ^Y pageup main
bind ^J pagedown main
bind ^F whereis main
bind ^R replace main
bind ^W chopwordleft main
bind ^O insert main
bind M-S writeout main
bind ^/ comment main
bind M-/ comment main
bind M-C comment main
bind ^A home main
bind ^E end main
bind ^L curpos main
bind ^G help main
bind ^Q exit main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment