nanorc: Customize key bindings
* Reorder key bindings as they are shown in the manual * Add more custom bindings * Remove conflicting bindings (duplicates and those that conflict with WM/DE shortcuts) * Unbind keys for functions I don't use * Some bindings are commented out because they don't work (e.g. special keys) * Remove duplicate "set multibuffer" (probably a leftover)
This commit is contained in:
228
nanorc
228
nanorc
@@ -268,32 +268,210 @@ include "/usr/share/nano/*.nanorc"
|
|||||||
## <Ctrl+Backspace> delete the word to the left of the cursor with:
|
## <Ctrl+Backspace> delete the word to the left of the cursor with:
|
||||||
bind ^H chopwordleft main
|
bind ^H chopwordleft main
|
||||||
|
|
||||||
## If you would like nano to have keybindings that are more "usual",
|
## The following custom key bindings are written in the order they appear
|
||||||
## such as ^O for Open, ^F for Find, ^H for Help, and ^Q for Quit,
|
## in the manual.
|
||||||
## then uncomment these:
|
## Not all functions have bindings, only the ones I use do.
|
||||||
|
# Special key bindings that mess with WM/DE
|
||||||
|
unbind ^Q all
|
||||||
|
unbind M-\ all
|
||||||
|
#unbind ^▲ all // doesn't work
|
||||||
|
#unbind ^▼ all // doesn't work
|
||||||
|
#unbind ^◀ all // doesn't work
|
||||||
|
# help
|
||||||
bind ^H help all
|
bind ^H help all
|
||||||
bind ^H exit help
|
bind ^H exit help
|
||||||
|
unbind ^G all
|
||||||
|
# exit
|
||||||
bind ^W exit all
|
bind ^W exit all
|
||||||
bind M-S writeout main
|
unbind F2 all
|
||||||
bind ^O insert main
|
# writeout
|
||||||
bind ^F whereis all
|
bind Sh-M-S writeout main
|
||||||
bind ^R replace main
|
unbind F3 main
|
||||||
bind ^X cut all
|
# savefile
|
||||||
bind ^V paste all
|
|
||||||
#bind ^P location main
|
|
||||||
#bind ^T gotoline main
|
|
||||||
#bind ^U undo main
|
|
||||||
bind ^Z undo main
|
|
||||||
#bind ^E redo main
|
|
||||||
bind ^Y redo main
|
|
||||||
#bind ^A mark main
|
|
||||||
bind ^C copy main
|
|
||||||
#bind ^B wherewas all
|
|
||||||
bind Sh-M-F findprevious all
|
|
||||||
bind M-F findnext all
|
|
||||||
bind M-C comment main
|
|
||||||
#bind ^Y speller main
|
|
||||||
#bind ^S savefile main
|
#bind ^S savefile main
|
||||||
#bind M-X flipnewbuffer all
|
# insert
|
||||||
#bind ^T gotodir browser
|
bind ^O insert main
|
||||||
#set multibuffer
|
# whereis
|
||||||
|
bind ^F whereis all
|
||||||
|
unbind F6 all
|
||||||
|
# wherewas
|
||||||
|
bind ^B wherewas all
|
||||||
|
unbind ^Q all
|
||||||
|
# findprevious
|
||||||
|
bind Sh-M-F findprevious all
|
||||||
|
unbind M-Q all
|
||||||
|
# findnext
|
||||||
|
bind M-F findnext all
|
||||||
|
unbind M-W all
|
||||||
|
# replace
|
||||||
|
bind ^R replace main
|
||||||
|
unbind ^\ main
|
||||||
|
unbind M-R main
|
||||||
|
# cut
|
||||||
|
bind ^X cut all
|
||||||
|
unbind ^K all
|
||||||
|
unbind F9 all
|
||||||
|
# copy
|
||||||
|
bind ^C copy main
|
||||||
|
unbind M-6 main
|
||||||
|
unbind M-^ main
|
||||||
|
# paste
|
||||||
|
bind ^V paste all
|
||||||
|
unbind ^U all
|
||||||
|
unbind F10 all
|
||||||
|
# chopwordleft
|
||||||
|
# previously set binding
|
||||||
|
#unbind Sh-^Del all // doesn't work
|
||||||
|
# cutrestoffile
|
||||||
|
bind M-T cutrestoffile all
|
||||||
|
# mark
|
||||||
|
#bind ^A mark main
|
||||||
|
#unbind ^6 main // doesn't work
|
||||||
|
# location
|
||||||
|
bind M-P location main
|
||||||
|
unbind F11 main
|
||||||
|
# wordcount
|
||||||
|
bind M-W wordcount main
|
||||||
|
unbind M-D main
|
||||||
|
# speller
|
||||||
|
bind M-S speller all
|
||||||
|
unbind F12 main
|
||||||
|
unbind ^S execute
|
||||||
|
unbind ^T execute
|
||||||
|
# formatter
|
||||||
|
bind M-M formatter all
|
||||||
|
unbind ^O execute
|
||||||
|
# linter
|
||||||
|
bind M-L linter all
|
||||||
|
unbind M-B main
|
||||||
|
unbind ^Y execute
|
||||||
|
# justify
|
||||||
|
bind M-J justify main
|
||||||
|
unbind ^J main
|
||||||
|
unbind F4 main
|
||||||
|
# fulljustify
|
||||||
|
bind Sh-M-J fulljustify all
|
||||||
|
unbind ^J execute
|
||||||
|
# indent
|
||||||
|
unbind M-} main
|
||||||
|
# unindent
|
||||||
|
unbind M-{ main
|
||||||
|
# comment
|
||||||
|
bind M-C comment main
|
||||||
|
unbind M-3 main
|
||||||
|
# complete
|
||||||
|
bind M-Space complete main
|
||||||
|
unbind ^] main
|
||||||
|
# left
|
||||||
|
unbind ^B all
|
||||||
|
# up
|
||||||
|
unbind ^P all
|
||||||
|
# down
|
||||||
|
unbind ^N all
|
||||||
|
# scrollup
|
||||||
|
unbind M-- main
|
||||||
|
unbind M-_ main
|
||||||
|
# scrolldown
|
||||||
|
unbind M-+ main
|
||||||
|
unbind M-= main
|
||||||
|
# nextworld
|
||||||
|
unbind ^Space all
|
||||||
|
# home
|
||||||
|
unbind ^A all
|
||||||
|
# end
|
||||||
|
unbind ^E all
|
||||||
|
# beginpara
|
||||||
|
unbind M-( main
|
||||||
|
unbind M-9 main
|
||||||
|
# endpara
|
||||||
|
unbind M-) main
|
||||||
|
unbind M-0 main
|
||||||
|
# prevblock
|
||||||
|
#unbind ^▲ main // doesn't work
|
||||||
|
unbind M-7 main
|
||||||
|
# nextblock
|
||||||
|
#unbind ^▼ main // doesn't work
|
||||||
|
unbind M-8 main
|
||||||
|
unbind ^O gotoline
|
||||||
|
# pageup
|
||||||
|
unbind ^Y help
|
||||||
|
unbind ^Y browser
|
||||||
|
unbind F7 all
|
||||||
|
# pagedown
|
||||||
|
unbind F8 all
|
||||||
|
# firstline
|
||||||
|
unbind ^Y gotoline
|
||||||
|
# lastline
|
||||||
|
unbind M-/ all
|
||||||
|
# findbracket
|
||||||
|
unbind M-] main
|
||||||
|
# gotoline
|
||||||
|
#bind ^T gotoline main
|
||||||
|
unbind ^_ main
|
||||||
|
# prevbuf
|
||||||
|
unbind M-< main
|
||||||
|
unbind M-, main
|
||||||
|
# nextbuf
|
||||||
|
unbind M-> main
|
||||||
|
unbind M-. main
|
||||||
|
# verbatim
|
||||||
|
#bind M-Ins verbatim all // doesn't work
|
||||||
|
# delete
|
||||||
|
unbind ^D all
|
||||||
|
# backspace
|
||||||
|
#unbind Sh-Del all // doesn't work
|
||||||
|
# recordmacro
|
||||||
|
unbind M-: main
|
||||||
|
# runmacro
|
||||||
|
unbind M-; main
|
||||||
|
# undo
|
||||||
|
bind ^Z undo main
|
||||||
|
unbind M-U main
|
||||||
|
# redo
|
||||||
|
bind ^Y redo main
|
||||||
|
unbind M-E main
|
||||||
|
# refresh
|
||||||
|
bind F5 refresh all
|
||||||
|
unbind ^L all
|
||||||
|
# flipgoto
|
||||||
|
unbind ^T search
|
||||||
|
unbind ^T gotoline
|
||||||
|
# flipexecute
|
||||||
|
bind M-E flipexecute insert
|
||||||
|
# flippipe
|
||||||
|
bind M-P flippipe execute
|
||||||
|
unbind M-\ all
|
||||||
|
# flipnewbuffer
|
||||||
|
bind M-N flipnewbuffer all
|
||||||
|
# flipconvert
|
||||||
|
bind M-C flipconvert insert
|
||||||
|
# browser
|
||||||
|
bind M-F browser writeout
|
||||||
|
bind M-F browser insert
|
||||||
|
unbind ^T writeout
|
||||||
|
unbind ^T insert
|
||||||
|
# gotodir
|
||||||
|
bind M-D gotodir browser
|
||||||
|
unbind ^_ browser
|
||||||
|
unbind M-G browser
|
||||||
|
# firstfile
|
||||||
|
#bind Home firstfile browser // doesn't work
|
||||||
|
unbind ^Y whereisfile
|
||||||
|
# lastfile
|
||||||
|
#bind End lastfile browser // doesn't work
|
||||||
|
# nohelp
|
||||||
|
bind M-? nohelp all
|
||||||
|
# nosyntaxt
|
||||||
|
unbind M-Y main
|
||||||
|
# cutfromcursor
|
||||||
|
#bind Sh-M-Del cutfromcursor main // doesn't work
|
||||||
|
unbind M-K main
|
||||||
|
# nowrap
|
||||||
|
bind M-H nowrap main
|
||||||
|
# tabstospaces
|
||||||
|
unbind M-O main
|
||||||
|
# mouse
|
||||||
|
bind Sh-M-M mouse main
|
||||||
|
# suspendable
|
||||||
|
unbind M-Z main
|
||||||
|
unbind ^Z execute
|
||||||
|
|||||||
Reference in New Issue
Block a user