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 ""
2004-05-29 16:38:57 +00:00
## The characters treated as closing brackets. They cannot contain tabs
## or spaces. Only closing punctuation, optionally followed by closing
## brackets, can end sentences.
##
# set brackets "'")}]>"
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-08-29 14:42:03 +00:00
## Use cut to end of line 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
2005-01-17 05:24:26 +00:00
## Use the blank line below the titlebar as extra editing space.
# set morespace
## Enable mouse support, so that mouse clicks can be used to set the
## mark and run shortcuts.
2004-05-08 00:06:15 +00:00
# set mouse
2004-08-29 14:42:03 +00:00
## Allow multiple file buffers (inserting a file will put it 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
2004-05-29 16:38:57 +00:00
## The characters treated as closing punctuation. They cannot contain
## tabs or spaces. Only closing punctuation, optionally followed by
## closing brackets, can end sentences.
##
# set punct ".?!"
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-22 20:15:20 +00:00
## Make the Home key smarter. When Home is pressed anywhere but at the
## very beginning of non-whitespace characters on a line, the cursor
## will jump to that beginning (either forwards or backwards). If the
## cursor is already at that position, it will jump to the true
## beginning of the line.
# set smarthome
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.
##
2004-10-21 17:11:40 +00:00
# set speller "aspell -x -c"
2001-05-26 04:18:54 +00:00
2004-08-29 14:42:03 +00:00
## Allow nano to be suspended.
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
2005-03-10 22:52:21 +00:00
## Disallow file modification; why would you want this in an rcfile? ;)
2002-06-28 22:45:14 +00:00
# set view
2002-03-03 22:52:52 +00:00
2005-03-26 23:15:51 +00:00
## The two single-column characters used to display the first characters
## of tabs and spaces. 187 decimal (00BB hexadecimal) and 183 decimal
## (00B7 hexadecimal) seem to be good values for these.
2004-05-29 16:25:30 +00:00
# set whitespace " "
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
##
2005-03-30 17:03:43 +00:00
# syntax "c-file" "\.(c|C|cc|cpp|h|H|hh|hpp)$"
2002-08-22 02:58:55 +00:00
# color red "\<[A-Z_]{2,}\>"
2005-03-30 17:10:57 +00:00
# color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|signed|unsigned|inline)\>"
# color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
2005-03-30 17:03:43 +00:00
# color brightyellow "\<(for|if|while|do|else|case|default|switch|goto|continue|break|return)\>"
# color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
2004-07-28 13:50:43 +00:00
# color brightcyan "^ *# *(define|undef|include|ifn?def|endif|elif|else|if)"
2005-01-20 16:40:24 +00:00
# color brightmagenta "'([^\]|(\\['abfnrtv\\]))'" "'\\(([0-7][0-7]?)|([0-3][0-7][0-7]))'" "'\\x[0-9A-Fa-f][0-9A-Fa-f]?'"
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]$"
2005-04-01 19:45:35 +00:00
# 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))\>"
# color red "\<(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)\>"
# color red "\<(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(dir)?)\>"
# color red "\<(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)\>"
# color red "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
2003-06-14 20:41:34 +00:00
# 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
2004-07-28 13:03:06 +00:00
## Here is an example for patch files
##
# syntax "patch" "\.(patch|diff)$"
# color brightgreen "^\+.*"
# color green "^\+\+\+.*"
# color brightblue "^ .*"
# color brightred "^-.*"
# color red "^---.*"
# color brightyellow "^@@.*"
# color magenta "^diff.*"
2005-03-11 20:22:48 +00:00
## Here is an example for manpages
##
# syntax "manpage" "\.[1-9]x?$"
# color green "\.(S|T)H.*$"
# color brightgreen "\.(S|T)H" "\.TP"
# color brightred "\.(BR?|I[PR]?).*$"
# color brightblue "\.(BR?|I[PR]?|PP)"
2005-03-11 20:32:06 +00:00
# color brightwhite "\\f[BIPR]"
2005-03-11 20:22:48 +00:00
# color yellow "\.(br|DS|RS|RE|PD)"
2003-06-14 20:41:34 +00:00
## Here is an example for your .nanorc
##
2005-03-10 17:35:41 +00:00
# syntax "nanorc" "(\.|/|)nanorc$"
2003-09-07 23:54:57 +00:00
## highlight possible errors and parameters
2005-03-10 17:35:41 +00:00
# color brightwhite "^ *(set|unset|syntax|color).*$"
2003-09-07 23:54:57 +00:00
## set, unset and syntax
2005-04-01 19:45:35 +00:00
# color cyan "^ *(set|unset) +(autoindent|backup|backupdir|brackets|const|cut|fill|historylog|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|punct|quotestr|rebinddelete|regexp|smarthome|smooth|speller|suspend|tabsize|tempfile)\>"
# color cyan "^ *(set|unset) +(view|whitespace)"
2005-03-10 17:35:41 +00:00
# color green "^ *(set|unset|syntax)\>"
2003-09-07 23:54:57 +00:00
## colors
2005-03-10 17:35:41 +00:00
# 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)="
2003-09-07 23:54:57 +00:00
## strings
2005-03-10 17:35:41 +00:00
# color white "\"(\\.|[^\"])*\""
2003-09-07 23:54:57 +00:00
## comments
2005-03-10 17:35:41 +00:00
# color blue "^ *#.*$"