2003-01-11 01:14:07 +00:00
## Sample initialization file for GNU nano
2003-06-14 20:41:34 +00:00
## Please note that you must have configured nano with --enable-nanorc
## for this file to be read! Also note that characters specially
## interpreted by the shell should not be escaped here.
2003-01-11 01:14:07 +00:00
##
## To make sure a value is not enabled, use "unset <option>"
2003-06-14 20:41:34 +00:00
##
## For the options that take parameters, the default value is given.
## Other options are unset by default.
2001-05-26 04:18:54 +00:00
2004-05-08 00:06:15 +00:00
## Use auto-indentation.
2002-06-28 22:45:14 +00:00
# set autoindent
2004-05-08 00:06:15 +00:00
## Backup files to filename~.
2002-06-28 22:45:14 +00:00
# set backup
2001-05-26 04:18:54 +00:00
2004-02-28 16:24:31 +00:00
## The directory to put the backup files in.
# set backupdir ""
2003-06-14 20:41:34 +00:00
## Constantly display the cursor position in the status bar.
2001-05-26 04:18:54 +00:00
# set const
2004-05-08 00:06:15 +00:00
## Use cut to end of line with ^K by default.
2001-05-26 04:18:54 +00:00
# set cut
2003-06-14 20:41:34 +00:00
## Set the line length for wrapping text and justifying paragraphs.
## If fill is negative, the line length will be the screen width less
## this number.
##
# set fill -8
## Enable ~/.nano_history for saving and reading search/replace strings.
# set historylog
2002-06-28 22:45:14 +00:00
2004-05-08 00:06:15 +00:00
## Enable mouse support so that mouse clicks can be used to set the mark
## and run shortcuts.
# set mouse
## Allow multiple file buffers (using ^R will insert into a separate
## buffer). You must have configured with --enable-multibuffer or
## --enable-extra for this to work.
2003-01-11 01:14:07 +00:00
##
2004-05-08 00:06:15 +00:00
# set multibuffer
2002-06-28 22:45:14 +00:00
2004-05-08 00:06:15 +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
2004-05-08 00:06:15 +00:00
## Don't follow symlinks when writing files.
2001-05-26 04:18:54 +00:00
# set nofollow
2004-05-08 00:06:15 +00:00
## Don't display the helpful shortcut lists at the bottom of the screen.
2002-06-28 22:45:14 +00:00
# set nohelp
2004-05-08 00:06:15 +00:00
## Don't wrap text at all.
2002-06-28 22:45:14 +00:00
# set nowrap
2003-06-14 20:41:34 +00:00
## Set operating directory. nano will not read or write files outside
## this directory and its subdirectories. Also, the current directory
## is changed to here, so files are inserted from this dir. A blank
## string means the operating directory feature is turned off.
##
# set operatingdir ""
2001-09-19 03:19:43 +00:00
2004-05-08 00:06:15 +00:00
## Preserve the XON and XOFF keys (^Q and ^S).
2003-01-11 01:14:07 +00:00
# set preserve
2001-05-26 04:18:54 +00:00
2003-06-14 20:41:34 +00:00
## The email-quote string, used to justify email-quoted paragraphs.
## This is an extended regular expression if your system supports them,
## otherwise a literal string. Default:
# set quotestr "^([ ]*[\|>:}#])+"
## 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
2004-05-08 00:06:15 +00:00
## Fix Backspace/Delete confusion problem.
2003-08-31 16:44:10 +00:00
# set rebinddelete
2004-05-08 00:06:15 +00:00
## Do extended regular expression searches by default.
2002-06-28 22:45:14 +00:00
# set regexp
2004-05-08 00:06:15 +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-06-14 20:41:34 +00:00
## Use this spelling checker instead of the internal one. This option
## does not properly have a default value.
##
# set speller "aspell -c"
2001-05-26 04:18:54 +00:00
2004-05-08 00:06:15 +00:00
## Allow nano to be suspended with ^Z.
2001-05-26 04:18:54 +00:00
# set suspend
2004-05-08 00:06:15 +00:00
## Use this tab size instead of the default; it must be greater than 0.
2003-06-14 20:41:34 +00:00
# set tabsize 8
2002-02-15 19:17:02 +00:00
2004-05-08 00:06:15 +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-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
2003-06-14 20:41:34 +00:00
## Format:
2003-01-11 01:14:07 +00:00
## syntax "short description" ["filename regex" ...]
## color foreground,background "regex" ["regex"...]
##
2003-06-14 20:41:34 +00:00
## Legal colors: white, black, red, blue, green, yellow, magenta, cyan.
## You may use the prefix "bright" to mean a stronger color highlight.
2003-01-11 01:14:07 +00:00
##
## 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.
2003-06-14 20:41:34 +00:00
##
# syntax "c-file" "\.(c|h)$"
2002-08-22 02:58:55 +00:00
# color red "\<[A-Z_]{2,}\>"
2003-06-14 20:41:34 +00:00
# color green "\<(float|char|int|void|static|const|struct)\>"
# color brightyellow "\<(if|while|do|else|case|switch)\>"
2003-09-06 19:04:02 +00:00
# color brightcyan "^ *# *(define|include|ifn?def|endif|elif|else|if)"
2003-06-14 20:41:34 +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
2003-06-14 20:41:34 +00:00
## are read in.
##
2003-09-06 19:04:02 +00:00
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
2003-06-14 20:41:34 +00:00
##
2003-01-11 01:14:07 +00:00
## This string is VERY resource intensive!!!
2003-09-06 19:04:02 +00:00
# color brightyellow start=""(\\.|[^\"])*\\ *$" end="^(\\.|[^\"])*""
2003-06-14 20:41:34 +00:00
##
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-06-14 20:41:34 +00:00
## Here is a short example for HTML
2002-10-02 00:05:40 +00:00
# syntax "HTML" "\.html$"
# color blue start="<" end=">"
2003-09-06 19:04:02 +00:00
# color red "&[^; ]*;"
2003-06-14 20:41:34 +00:00
## Here is a short example for TeX files
2002-10-02 00:05:40 +00:00
# syntax "TeX" "\.tex$"
2003-06-14 20:41:34 +00:00
# color green "\\.|\\[A-Za-z]*"
# color magenta "[{}]"
2002-10-02 00:05:40 +00:00
# color blue "%.*"
2003-06-14 20:41:34 +00:00
## Here is an example for quoted emails (under e.g. mutt)
2002-05-04 04:27:06 +00:00
# syntax "mutt"
# color green "^>.*"
2002-10-02 00:05:40 +00:00
2003-06-14 20:41:34 +00:00
## Here is an example for groff
##
# syntax "groff" "\.ms$" "\.mm$" "\.me$" "\.tmac$" "^tmac." ".rof"
2003-01-11 01:14:07 +00:00
## The argument of .nr or .ds
2003-06-14 20:41:34 +00:00
# color cyan "^\.ds [^ ]*"
# color cyan "^\.nr [^ ]*"
2003-01-11 01:14:07 +00:00
## Single character escapes
2003-06-14 20:41:34 +00:00
# color brightmagenta "\\."
## Highlight the argument of \f or \s in the same color
# color brightmagenta "\\f."
# color brightmagenta "\\f\(.."
# color brightmagenta "\\s(\+|\-)?[0-9]"
2003-01-11 01:14:07 +00:00
## \n
2003-06-14 20:41:34 +00:00
# color cyan "(\\|\\\\)n."
# color cyan "(\\|\\\\)n\(.."
# color cyan start="(\\|\\\\)n\[" end="]"
2003-01-11 01:14:07 +00:00
## Requests
2003-06-14 20:41:34 +00:00
# color brightgreen "^\. *[^ ]*"
2003-01-11 01:14:07 +00:00
## Comments
2003-06-14 20:41:34 +00:00
# color yellow "^\.\\\".*$"
2003-01-11 01:14:07 +00:00
## Strings
2003-06-14 20:41:34 +00:00
# color green "(\\|\\\\)\*."
# color green "(\\|\\\\)\*\(.."
# color green start="(\\|\\\\)\*\[" end="]"
2003-01-11 01:14:07 +00:00
## Characters
2003-06-14 20:41:34 +00:00
# color brightred "\\\(.."
# color brightred start="\\\[" end="]"
2003-01-11 01:14:07 +00:00
## Macro arguments
2003-06-14 20:41:34 +00:00
# color brightcyan "\\\\\$[1-9]"
## Here is an example for perl
##
# syntax "perl" "\.p[lm]$"
# color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork)|get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join|keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek|seekdir|se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr|y|truncate|umask|un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
# color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
# color cyan start="[$@%]" end="( |\\W|-)"
# color yellow "".*"|qq\|.*\|"
# color white "[sm]/.*/"
# color white start="(^use| = new)" end=";"
# color green "#.*"
# color yellow start="<< 'STOP'" end="STOP"
## Here is an example for Java source
##
# syntax "Java source" "\.java$"
# color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
# color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
# color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>"
# color red ""[^\"]*""
# color yellow "\<(true|false|null)\>"
# color blue "//.*"
# color blue start="/\*" end="\*/"
# color brightblue start="/\*\*" end="\*/"
2003-09-06 19:04:02 +00:00
# color brightgreen,green " +$"
2003-06-14 20:41:34 +00:00
## Here is an example for your .nanorc
##
2003-09-07 23:54:57 +00:00
#syntax "nanorc" "(\.|/|)nanorc$"
## highlight possible errors and parameters
#color brightwhite "^ *(set|unset|syntax|color).*$"
## set, unset and syntax
2004-05-08 00:06:15 +00:00
#color cyan "^ *(set|unset) +(autoindent|backup|backupdir|const|cut|fill|historylog|mouse|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|quotestr|rebinddelete|regexp|smooth|speller|suspend|tabsize|tempfile|view)"
2003-09-07 23:54:57 +00:00
#color green "^ *(set|unset|syntax)\>"
## colors
#color yellow "^ *color +(bright)?(white|black|red|blue|green|yellow|magenta|cyan)(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
#color magenta "^ *color\>" "\<(start|end)="
## strings
#color white "\"(\\.|[^\"])*\""
## comments
#color blue "^ *#.*$"