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
2005-05-30 06:09:21 +04:00
## The directory to put unique backup files in.
2004-02-28 19:24:31 +03:00
# set backupdir ""
2005-06-16 22:48:30 +04:00
## Do backwards searches by default.
# set backwards
2005-06-17 22:00:16 +04:00
## The characters treated as closing brackets. They cannot contain
## blank characters. Only closing punctuation, optionally followed by
## closing brackets, can end sentences.
2004-05-29 20:38:57 +04:00
##
# set brackets "'")}]>"
2005-06-16 22:48:30 +04:00
## Do case sensitive searches by default.
# set casesensitive
2005-06-18 02:11:43 +04:00
## Constantly display the cursor position in the statusbar. Note that
## this cancels out "quickblank".
2001-05-26 08:18:54 +04:00
# set const
2004-08-29 18:42:03 +04:00
## Use cut to end of line 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
2005-01-17 08:24:26 +03: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 04:06:15 +04:00
# set mouse
2004-08-29 18:42:03 +04:00
## Allow multiple file buffers (inserting a file will put it into a
## separate buffer). You must have configured with --enable-multibuffer
2005-06-15 22:53:47 +04:00
## 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
2005-06-17 22:00:16 +04:00
## blank characters. Only closing punctuation, optionally followed by
2004-05-29 20:38:57 +04:00
## closing brackets, can end sentences.
##
# set punct ".?!"
2005-06-17 23:06:25 +04:00
## Do quick statusbar blanking. Statusbar messages will disappear after
2005-06-18 02:11:43 +04:00
## 1 keystroke instead of 25. Note that "const" cancels this out.
2005-06-17 23:06:25 +04:00
##
# set quickblank
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
2005-06-16 22:48:30 +04:00
## Do extended regular expression searches by default.
# 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.
##
2004-10-21 21:11:40 +04:00
# set speller "aspell -x -c"
2001-05-26 08:18:54 +04:00
2004-08-29 18:42:03 +04:00
## Allow nano to be suspended.
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
2005-06-16 05:18:56 +04:00
## Convert typed tabs to spaces.
# set tabstospaces
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
2005-03-11 01:52:21 +03:00
## Disallow file modification; why would you want this in an rcfile? ;)
2002-06-29 02:45:14 +04:00
# set view
2002-03-04 01:52:52 +03:00
2005-03-27 03:15:51 +04: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 20:25:30 +04:00
# 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.
2005-06-09 01:30:50 +04:00
## You may use the prefix "bright" to mean a stronger color highlight
## for the foreground.
2003-01-11 04:14:07 +03:00
##
## To use multi-line regexes use the start="regex" end="regex" format.
##
2005-06-09 01:30:50 +04:00
## 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
##
2005-06-26 06:55:04 +04:00
# syntax "c-file" "\.(c|C|cc|cpp|cxx|h|H|hh|hpp|hxx)$"
2002-08-22 06:58:55 +04:00
# color red "\<[A-Z_]{2,}\>"
2005-03-30 21:10:57 +04: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 21:03:43 +04:00
# color brightyellow "\<(for|if|while|do|else|case|default|switch|goto|continue|break|return)\>"
# color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
2005-06-26 07:26:24 +04:00
# color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
2005-01-20 19:40:24 +03: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-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.
##
2005-06-26 07:26:24 +04:00
# color brightyellow "<[^=[[:space:]]]*>" ""(\\.|[^\"])*""
2003-06-15 00:41:34 +04:00
##
2003-01-11 04:14:07 +03:00
## This string is VERY resource intensive!!!
2005-06-26 07:26:24 +04:00
# color brightyellow start=""(\\.|[^\"])*\\[[:space:]]*$" 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=">"
2005-06-26 07:26:24 +04:00
# color red "&[^;[[:space:]]]*;"
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
2005-06-26 07:26:24 +04:00
# color cyan "^\.ds [^[[:space:]]]*"
# color cyan "^\.nr [^[[:space:]]]*"
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
2005-06-26 07:26:24 +04:00
# color brightgreen "^\.[[:space:]]*[^[[:space:]]]*"
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]$"
2005-06-26 07:26:24 +04: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))\>" "\<(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(dir)?)\>" "\<(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)\>"
2003-06-15 00:41:34 +04: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="\*/"
2005-06-26 07:26:24 +04:00
# color brightgreen,green "[[:space:]]+$"
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.*"
2005-03-11 23:22:48 +03: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 23:32:06 +03:00
# color brightwhite "\\f[BIPR]"
2005-03-11 23:22:48 +03:00
# color yellow "\.(br|DS|RS|RE|PD)"
2003-06-15 00:41:34 +04:00
## Here is an example for your .nanorc
##
2005-03-10 20:35:41 +03:00
# syntax "nanorc" "(\.|/|)nanorc$"
2003-09-08 03:54:57 +04:00
## highlight possible errors and parameters
2005-06-26 07:26:24 +04:00
# color brightwhite "^[[:space:]]*(set|unset|syntax|color).*$"
2003-09-08 03:54:57 +04:00
## set, unset and syntax
2005-06-26 07:26:24 +04:00
# color cyan "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|brackets|casesensitive|const|cut|fill|historylog|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|punct|quickblank|quotestr|rebinddelete)\>" "^[[:space:]]*(set|unset)[[:space:]]+(regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace)\>"
# color green "^[[:space:]]*(set|unset|syntax)\>"
2003-09-08 03:54:57 +04:00
## colors
2005-06-26 07:26:24 +04:00
# color yellow "^[[:space:]]*color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
# color magenta "^[[:space:]]*color\>" "\<(start|end)="
2003-09-08 03:54:57 +04:00
## strings
2005-03-10 20:35:41 +03:00
# color white "\"(\\.|[^\"])*\""
2003-09-08 03:54:57 +04:00
## comments
2005-06-26 07:26:24 +04:00
# color blue "[[:space:]]*#.*$"