2003-01-11 01:14:07 +00:00
|
|
|
## Sample initialization file for GNU nano
|
|
|
|
## Please note that you must have configured nano with
|
|
|
|
## --enable-nanorc for this file to be read!
|
|
|
|
##
|
|
|
|
## To make sure a value is not enabled, use "unset <option>"
|
2001-05-26 04:18:54 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Use auto-indentation
|
2002-06-28 22:45:14 +00:00
|
|
|
# set autoindent
|
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Backup files to filename~
|
2002-06-28 22:45:14 +00:00
|
|
|
# set backup
|
2001-05-26 04:18:54 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Constantly update the cursor position
|
2001-05-26 04:18:54 +00:00
|
|
|
# set const
|
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Use cut to end of line with ^K by default
|
2001-05-26 04:18:54 +00:00
|
|
|
# set cut
|
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Use this value instead of the default
|
|
|
|
## An out-of-range negative value can make nano die complaining that the
|
|
|
|
## screen is too small
|
|
|
|
## set fill -8
|
2002-06-28 22:45:14 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Use alternate keypad routines
|
2002-06-28 22:45:14 +00:00
|
|
|
# set keypad
|
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Allow multiple file buffers (using ^R inserts into separate buffer)
|
|
|
|
## You must have configured with --enable-multibuffer or --enable-extra
|
|
|
|
## for this to work
|
|
|
|
##
|
|
|
|
## set multibuffer
|
2002-06-28 22:45:14 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Don't convert files from DOS/Mac format
|
2002-06-28 22:45:14 +00:00
|
|
|
# set noconvert
|
2001-05-26 04:18:54 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Don't follow symlinks when writing files
|
2001-05-26 04:18:54 +00:00
|
|
|
# set nofollow
|
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Don't display the help lists at the bottom of the screen
|
2002-06-28 22:45:14 +00:00
|
|
|
# set nohelp
|
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Don't wrap text at all
|
2002-06-28 22:45:14 +00:00
|
|
|
# set nowrap
|
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Set operating directory (chroot of sorts)
|
2001-09-19 03:19:43 +00:00
|
|
|
# set operatingdir "~"
|
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Preserve the XON and XOFF keys (^Q and ^S)
|
|
|
|
# set preserve
|
2001-05-26 04:18:54 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## The email-quote string. This is a "regular expression" if your
|
|
|
|
## system supports them, otherwise a literal string. Default
|
2002-07-19 01:08:59 +00:00
|
|
|
# set quotestr "^([ \t]*[|>:}#])+" if you have regexps, otherwise
|
|
|
|
# set quotestr "> ".
|
2003-01-11 01:14:07 +00:00
|
|
|
## You can get old nano quoted-justify behavior via:
|
2002-07-19 01:08:59 +00:00
|
|
|
# set quotestr "(> )+"
|
2001-05-26 04:18:54 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Do regular expression searches by default
|
2002-06-28 22:45:14 +00:00
|
|
|
# set regexp
|
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Use smooth scrolling as the default
|
2002-06-28 22:45:14 +00:00
|
|
|
# set smooth
|
2001-10-02 23:57:31 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Use this spelling checker instead of the default one
|
2001-05-26 04:18:54 +00:00
|
|
|
# set speller aspell
|
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Allow nano to be suspended with ^Z
|
2001-05-26 04:18:54 +00:00
|
|
|
# set suspend
|
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Use this tab size instead of the default; it must be greater than 0
|
2002-06-28 22:45:14 +00:00
|
|
|
# set tabsize 4
|
2002-02-15 19:17:02 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Save automatically on exit, don't prompt
|
2002-06-28 22:45:14 +00:00
|
|
|
# set tempfile
|
2001-11-29 02:42:27 +00:00
|
|
|
|
2003-01-16 23:44:46 +00:00
|
|
|
## Enable ~/.nano_history for saving and reading search/replace strings.
|
|
|
|
# set historylog
|
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Disallow file modification, why would you want this in an rc file? ;)
|
2002-06-28 22:45:14 +00:00
|
|
|
# set view
|
2002-03-03 22:52:52 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## Color setup
|
|
|
|
## Format:
|
|
|
|
## syntax "short description" ["filename regex" ...]
|
|
|
|
## color foreground,background "regex" ["regex"...]
|
|
|
|
##
|
2003-01-23 01:21:26 +00:00
|
|
|
## Legal colors are: white, black, red, blue, green, yellow, magenta,
|
2003-01-11 01:14:07 +00:00
|
|
|
## cyan. You may use the prefix "bright" to mean a stronger color
|
|
|
|
## highlight.
|
|
|
|
##
|
|
|
|
## To use multi-line regexes use the start="regex" end="regex" format.
|
|
|
|
##
|
|
|
|
## If your system supports transparency, not specifying a background
|
|
|
|
## color will use a transparent color. If you don't want this, be sure
|
|
|
|
## to set the background color to black or white.
|
2002-06-28 22:45:14 +00:00
|
|
|
|
2002-07-19 01:08:59 +00:00
|
|
|
# syntax "c-file" ".*\.c$" ".*\.h$"
|
2002-08-22 02:58:55 +00:00
|
|
|
# color red "\<[A-Z_]{2,}\>"
|
2002-05-18 03:13:03 +00:00
|
|
|
# color green "\<float\>" "\<char\>" "\<int\>" "\<void\>"
|
|
|
|
# color green "\<static\>" "\<const\>" "\<struct\>"
|
|
|
|
# color brightyellow "\<if\>" "\<while\>" "\<do\>" "\<else\>" "\<case\>" "\<switch\>"
|
|
|
|
# color brightcyan "#define" "#include" "#ifn*def" "#endif"
|
|
|
|
# color brightcyan "#elif" "#else" "#if"
|
2002-05-04 04:27:06 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## You will in general want your comments and strings to come last,
|
|
|
|
## because syntax highlighting rules will be applied in the order they
|
|
|
|
## are read in. Note that quotes in regexes should not be escaped (use "
|
|
|
|
## instead of \").
|
2002-05-04 04:27:06 +00:00
|
|
|
|
2002-09-27 14:21:59 +00:00
|
|
|
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
|
2003-01-11 01:14:07 +00:00
|
|
|
|
|
|
|
## This string is VERY resource intensive!!!
|
2002-09-27 14:21:59 +00:00
|
|
|
# color brightyellow start=""(\\.|[^\"])*\\( | )*$" end="^(\\.|[^\"])*""
|
2003-01-11 01:14:07 +00:00
|
|
|
|
|
|
|
## And we want to have some nice comment highlighting too
|
2002-05-04 04:27:06 +00:00
|
|
|
# color brightblue "//.*"
|
2002-07-19 01:08:59 +00:00
|
|
|
# color brightblue start="/\*" end="\*/"
|
2002-05-04 04:27:06 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
|
|
|
|
## Here are some short examples for TeX files and HTML
|
2002-10-02 00:05:40 +00:00
|
|
|
# syntax "HTML" "\.html$"
|
|
|
|
#
|
|
|
|
# color blue start="<" end=">"
|
|
|
|
# color red "&([^; ])*;"
|
|
|
|
#
|
|
|
|
# syntax "TeX" "\.tex$"
|
|
|
|
#
|
|
|
|
# color green "\\(.|([A-Za-z]*))"
|
|
|
|
# color magenta "\{" "\}"
|
|
|
|
# color blue "%.*"
|
|
|
|
|
2002-06-28 22:45:14 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
## For this you will probably want to set your editor to "nano -Y mutt"
|
2002-05-04 04:27:06 +00:00
|
|
|
# syntax "mutt"
|
|
|
|
# color green "^>.*"
|
2002-10-02 00:05:40 +00:00
|
|
|
|
2003-01-11 01:14:07 +00:00
|
|
|
|
|
|
|
## Here is are examples for groff and for your .nanorc
|
|
|
|
|
|
|
|
#syntax "groff" "\.ms$" "\.mm$" "\.me$" "\.tmac$" "^tmac." ".rof"
|
|
|
|
## The argument of .nr or .ds
|
|
|
|
#color cyan "^\.ds [^ ]*"
|
|
|
|
#color cyan "^\.nr [^ ]*"
|
|
|
|
## Single character escapes
|
|
|
|
#color brightmagenta "\\."
|
|
|
|
## Highlight the argument of \f or \s in the same colour
|
|
|
|
#color brightmagenta "\\f."
|
|
|
|
#color brightmagenta "\\f\(.."
|
|
|
|
#color brightmagenta "\\s(\+|\-)?[0-9]"
|
|
|
|
## \n
|
|
|
|
#color cyan "(\\|\\\\)n."
|
|
|
|
#color cyan "(\\|\\\\)n\(.."
|
|
|
|
#color cyan start="(\\|\\\\)n\[" end="]"
|
|
|
|
## Requests
|
|
|
|
#color brightgreen "^\. *[^ ]*"
|
|
|
|
## Comments
|
|
|
|
#color yellow "^\.\\\".*$"
|
|
|
|
## Strings
|
|
|
|
#color green "(\\|\\\\)\*."
|
|
|
|
#color green "(\\|\\\\)\*\(.."
|
|
|
|
#color green start="(\\|\\\\)\*\[" end="]"
|
|
|
|
## Characters
|
|
|
|
#color brightred "\\\(.."
|
|
|
|
#color brightred start="\\\[" end="]"
|
|
|
|
## Macro arguments
|
|
|
|
#color brightcyan "\\\\\$[1-9]"
|
|
|
|
|
|
|
|
|
|
|
|
#syntax "nanorc" "[\.]*nanorc$"
|
|
|
|
#color white "^ *(set|unset).*$"
|
2003-01-16 23:44:46 +00:00
|
|
|
#color cyan "^ *(set|unset) (autoindent|backup|const|cut|fill|keypad|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|quotestr|regexp|smooth|speller|suspend|tabsize|tempfile|historylog|view)"
|
2003-01-11 01:14:07 +00:00
|
|
|
#color brightwhite "^ *syntax [^ ]*"
|
|
|
|
#color brightblue "^ *set\>" "^ *unset\>" "^ *syntax\>"
|
|
|
|
#color white "^ *color\>.*"
|
|
|
|
#color yellow "^ *color [^ ]*"
|
|
|
|
#color magenta "^ *color\>"
|
|
|
|
#color green "^#.*$"
|