2003-01-11 04:14:07 +03:00
## Sample initialization file for GNU nano
2003-06-15 00:41:34 +04: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 04:14:07 +03:00
##
## To make sure a value is not enabled, use "unset <option>"
2003-06-15 00:41:34 +04:00
##
## For the options that take parameters, the default value is given.
## Other options are unset by default.
2001-05-26 08:18:54 +04:00
2004-05-08 04:06:15 +04:00
## Use auto-indentation.
2002-06-29 02:45:14 +04:00
# set autoindent
2004-05-08 04:06:15 +04:00
## Backup files to filename~.
2002-06-29 02:45:14 +04:00
# set backup
2001-05-26 08:18:54 +04:00
2004-02-28 19:24:31 +03:00
## The directory to put the backup files in.
# set backupdir ""
2004-05-29 20:38:57 +04: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-15 00:41:34 +04:00
## Constantly display the cursor position in the status bar.
2001-05-26 08:18:54 +04:00
# set const
2004-05-08 04:06:15 +04:00
## Use cut to end of line with ^K by default.
2001-05-26 08:18:54 +04:00
# set cut
2003-06-15 00:41:34 +04: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-29 02:45:14 +04:00
2004-05-08 04:06:15 +04: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 04:14:07 +03:00
##
2004-05-08 04:06:15 +04:00
# set multibuffer
2002-06-29 02:45:14 +04:00
2004-05-08 04:06:15 +04:00
## Don't convert files from DOS/Mac format.
2002-06-29 02:45:14 +04:00
# set noconvert
2001-05-26 08:18:54 +04:00
2004-05-08 04:06:15 +04:00
## Don't follow symlinks when writing files.
2001-05-26 08:18:54 +04:00
# set nofollow
2004-05-08 04:06:15 +04:00
## Don't display the helpful shortcut lists at the bottom of the screen.
2002-06-29 02:45:14 +04:00
# set nohelp
2004-05-08 04:06:15 +04:00
## Don't wrap text at all.
2002-06-29 02:45:14 +04:00
# set nowrap
2003-06-15 00:41:34 +04: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 07:19:43 +04:00
2004-05-08 04:06:15 +04:00
## Preserve the XON and XOFF keys (^Q and ^S).
2003-01-11 04:14:07 +03:00
# set preserve
2001-05-26 08:18:54 +04:00
2004-05-29 20:38:57 +04: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-15 00:41:34 +04: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 04:14:07 +03:00
## You can get old nano quoted-justify behavior via:
2002-07-19 05:08:59 +04:00
# set quotestr "(> )+"
2001-05-26 08:18:54 +04:00
2004-05-08 04:06:15 +04:00
## Fix Backspace/Delete confusion problem.
2003-08-31 20:44:10 +04:00
# set rebinddelete
2004-05-08 04:06:15 +04:00
## Do extended regular expression searches by default.
2002-06-29 02:45:14 +04:00
# set regexp
2004-05-23 00:15:20 +04: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 04:06:15 +04:00
## Use smooth scrolling as the default.
2002-06-29 02:45:14 +04:00
# set smooth
2001-10-03 03:57:31 +04:00
2003-06-15 00:41:34 +04: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 08:18:54 +04:00
2004-05-08 04:06:15 +04:00
## Allow nano to be suspended with ^Z.
2001-05-26 08:18:54 +04:00
# set suspend
2004-05-08 04:06:15 +04:00
## Use this tab size instead of the default; it must be greater than 0.
2003-06-15 00:41:34 +04:00
# set tabsize 8
2002-02-15 22:17:02 +03:00
2004-05-08 04:06:15 +04:00
## Save automatically on exit, don't prompt.
2002-06-29 02:45:14 +04:00
# set tempfile
2001-11-29 05:42:27 +03:00
2003-01-11 04:14:07 +03:00
## Disallow file modification, why would you want this in an rc file? ;)
2002-06-29 02:45:14 +04:00
# set view
2002-03-04 01:52:52 +03:00
2004-05-29 20:25:30 +04:00
## The two characters used to display the first characters of tabs and
## spaces. ASCII 187 and ASCII 183 seem to be good values for these.
# set whitespace " "
2003-01-11 04:14:07 +03:00
## Color setup
2003-06-15 00:41:34 +04:00
## Format:
2003-01-11 04:14:07 +03:00
## syntax "short description" ["filename regex" ...]
## color foreground,background "regex" ["regex"...]
##
2003-06-15 00:41:34 +04: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 04:14:07 +03: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-15 00:41:34 +04:00
##
# syntax "c-file" "\.(c|h)$"
2002-08-22 06:58:55 +04:00
# color red "\<[A-Z_]{2,}\>"
2004-07-28 17:50:43 +04:00
# color green "\<(float|double|char|int|short|long|enum|void|static|const|struct|union|typedef|extern|signed|unsigned|inline)\>"
# color brightyellow "\<(for|if|while|do|else|case|switch|break)\>"
# color brightcyan "^ *# *(define|undef|include|ifn?def|endif|elif|else|if)"
2003-06-15 00:41:34 +04:00
##
2003-01-11 04:14:07 +03: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-15 00:41:34 +04:00
## are read in.
##
2003-09-06 23:04:02 +04:00
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
2003-06-15 00:41:34 +04:00
##
2003-01-11 04:14:07 +03:00
## This string is VERY resource intensive!!!
2003-09-06 23:04:02 +04:00
# color brightyellow start=""(\\.|[^\"])*\\ *$" end="^(\\.|[^\"])*""
2003-06-15 00:41:34 +04:00
##
2003-01-11 04:14:07 +03:00
## And we want to have some nice comment highlighting too
2002-05-04 08:27:06 +04:00
# color brightblue "//.*"
2002-07-19 05:08:59 +04:00
# color brightblue start="/\*" end="\*/"
2002-05-04 08:27:06 +04:00
2003-06-15 00:41:34 +04:00
## Here is a short example for HTML
2002-10-02 04:05:40 +04:00
# syntax "HTML" "\.html$"
# color blue start="<" end=">"
2003-09-06 23:04:02 +04:00
# color red "&[^; ]*;"
2003-06-15 00:41:34 +04:00
## Here is a short example for TeX files
2002-10-02 04:05:40 +04:00
# syntax "TeX" "\.tex$"
2003-06-15 00:41:34 +04:00
# color green "\\.|\\[A-Za-z]*"
# color magenta "[{}]"
2002-10-02 04:05:40 +04:00
# color blue "%.*"
2003-06-15 00:41:34 +04:00
## Here is an example for quoted emails (under e.g. mutt)
2002-05-04 08:27:06 +04:00
# syntax "mutt"
# color green "^>.*"
2002-10-02 04:05:40 +04:00
2003-06-15 00:41:34 +04:00
## Here is an example for groff
##
# syntax "groff" "\.ms$" "\.mm$" "\.me$" "\.tmac$" "^tmac." ".rof"
2003-01-11 04:14:07 +03:00
## The argument of .nr or .ds
2003-06-15 00:41:34 +04:00
# color cyan "^\.ds [^ ]*"
# color cyan "^\.nr [^ ]*"
2003-01-11 04:14:07 +03:00
## Single character escapes
2003-06-15 00:41:34 +04: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 04:14:07 +03:00
## \n
2003-06-15 00:41:34 +04:00
# color cyan "(\\|\\\\)n."
# color cyan "(\\|\\\\)n\(.."
# color cyan start="(\\|\\\\)n\[" end="]"
2003-01-11 04:14:07 +03:00
## Requests
2003-06-15 00:41:34 +04:00
# color brightgreen "^\. *[^ ]*"
2003-01-11 04:14:07 +03:00
## Comments
2003-06-15 00:41:34 +04:00
# color yellow "^\.\\\".*$"
2003-01-11 04:14:07 +03:00
## Strings
2003-06-15 00:41:34 +04:00
# color green "(\\|\\\\)\*."
# color green "(\\|\\\\)\*\(.."
# color green start="(\\|\\\\)\*\[" end="]"
2003-01-11 04:14:07 +03:00
## Characters
2003-06-15 00:41:34 +04:00
# color brightred "\\\(.."
# color brightred start="\\\[" end="]"
2003-01-11 04:14:07 +03:00
## Macro arguments
2003-06-15 00:41:34 +04: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 23:04:02 +04:00
# color brightgreen,green " +$"
2003-06-15 00:41:34 +04:00
2004-07-28 17:03:06 +04: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.*"
2003-06-15 00:41:34 +04:00
## Here is an example for your .nanorc
##
2003-09-08 03:54:57 +04:00
#syntax "nanorc" "(\.|/|)nanorc$"
## highlight possible errors and parameters
#color brightwhite "^ *(set|unset|syntax|color).*$"
## set, unset and syntax
2004-05-29 20:38:57 +04:00
#color cyan "^ *(set|unset) +(autoindent|backup|backupdir|brackets|const|cut|fill|historylog|mouse|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|punct|quotestr|rebinddelete|regexp|smarthome|smooth|speller|suspend|tabsize|tempfile|view|whitespace)"
2003-09-08 03:54:57 +04: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 "^ *#.*$"