2006-03-12 22:27:32 +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.
2006-03-12 22:27:32 +03:00
##
## Quotes inside string parameters don't have to be escaped with
## backslashes. The last double quote in the string will be treated as
## its end. For example, for the brackets option, "'")}]>" will match
## ', ", ), }, ], and >.
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
##
2006-01-03 07:53:41 +03:00
# set brackets ""')>]}"
2004-05-29 20:38:57 +04:00
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.
2005-06-27 09:01:32 +04:00
## If fill is 0 or less, the line length will be the screen width less
2003-06-15 00:41:34 +04:00
## 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
2006-01-07 00:51:10 +03:00
## The opening and closing brackets that can be found by bracket
2006-01-07 01:35:52 +03:00
## searches. They cannot contain blank characters. The former set must
## come before the latter set, and both must be in the same order.
2006-01-07 00:51:10 +03:00
##
# set matchbrackets "(<[{)>]}"
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
2005-11-05 20:35:44 +03:00
## Don't add newlines to the ends of files.
# set nonewlines
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.
##
2006-01-03 07:53:41 +03:00
# set punct "!.?"
2004-05-29 20:38:57 +04:00
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:
2006-01-03 07:53:41 +03:00
# set quotestr "^([ ]*[#:>\|}])+"
2003-06-15 00:41:34 +04:00
## if you have regexps, otherwise:
# 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-08-11 01:22:15 +04:00
## Fix numeric keypad key confusion problem.
# set rebindkeypad
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 " "
2005-08-11 02:12:28 +04:00
## Detect word boundaries more accurately by treating punctuation
## characters as part of a word.
# set wordbounds
2003-01-11 04:14:07 +03:00
## Color setup
2005-06-27 07:07:10 +04:00
##
2003-06-15 00:41:34 +04:00
## Format:
2005-06-27 07:07:10 +04:00
##
2003-01-11 04:14:07 +03:00
## syntax "short description" ["filename regex" ...]
2005-06-27 07:07:10 +04:00
##
2005-08-01 08:59:34 +04:00
## (The "none" syntax is reserved; specifying it on the command line is
## the same as not having a syntax at all. The "default" syntax is
## special: it takes no filename regexes, and applies to files that
## don't match any other syntax's filename regexes.)
2005-08-01 08:23:29 +04:00
##
2003-01-11 04:14:07 +03:00
## color foreground,background "regex" ["regex"...]
2005-06-27 07:07:10 +04:00
## or
## icolor foreground,background "regex" ["regex"...]
##
2005-08-01 08:23:29 +04:00
## ("color" will do case sensitive matches, while "icolor" will do case
## insensitive matches.)
2003-01-11 04:14:07 +03:00
##
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
##
2005-06-27 03:35:55 +04:00
## To use multi-line regexes, use the start="regex" end="regex" format.
2003-01-11 04:14:07 +03:00
##
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)$"
2005-10-04 08:21:43 +04:00
# color brightred "\<[A-Z_][A-Z_0-9]+\>"
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)\>"
2005-10-04 08:52:06 +04:00
# color green "\<(u_?)?int(8|16|32|64|ptr)_t\>"
2005-03-30 21:10:57 +04:00
# color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
2005-10-04 08:21:43 +04:00
# color brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
2005-03-30 21:03:43 +04:00
# color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
2005-10-04 08:21:43 +04:00
# color magenta "\<(goto|continue|break|return)\>"
2005-06-26 07:26:24 +04:00
# color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
2005-10-27 23:06:47 +04: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
##
2005-06-27 06:56:59 +04:00
## GCC builtins
##
2005-10-04 08:21:43 +04:00
# color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
2005-06-27 06:56:59 +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 23:49:53 +04:00
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
2003-06-15 00:41:34 +04:00
##
2005-08-01 09:55:07 +04: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$"
2005-10-11 23:20:52 +04:00
# icolor green "\\.|\\[A-Z]*"
2003-06-15 00:41:34 +04:00
# 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
##
2005-06-27 07:04:49 +04:00
# syntax "groff" "\.m[ems]$" "\.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)"
2005-06-26 07:32:03 +04:00
## Here is an example for assembler
##
# syntax "asm-file" "\.(S|s|asm)$"
# color red "\<[A-Z_]{2,}\>"
# color brightgreen "\.(data|subsection|text)"
# color green "\.(align|file|globl|global|hidden|section|size|type|weak)"
# color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)"
2005-06-27 07:07:10 +04:00
# icolor brightred "^[[:space:]]*[._A-Z0-9]*:"
2005-06-26 07:32:03 +04:00
# color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
## Highlight strings (note: VERY resource intensive)
2005-06-27 03:16:14 +04:00
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
2005-06-26 07:32:03 +04:00
# color brightyellow start=""(\\.|[^\"])*\\[[:space:]]*$" end="^(\\.|[^\"])*""
## Highlight comments
# color brightblue "//.*"
# color brightblue start="/\*" end="\*/"
2005-07-04 02:00:29 +04:00
## Here is an example for Bourne shell scripts
##
# syntax "shellscript" "\.sh$"
# icolor brightgreen "^[_A-Z0-9]+\(\)"
# color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
# color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
# color green "-(L|d|e|f|g|r|u|w|x)\>"
# color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
# color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
# icolor brightred "\$\{?[_A-Z0-9]+\}?"
# color yellow "#.*$"
# color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
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-27 07:07:10 +04:00
# icolor brightwhite "^[[:space:]]*(set|unset|syntax|i?color).*$"
2003-09-08 03:54:57 +04:00
## set, unset and syntax
2006-01-07 00:51:10 +03:00
# icolor cyan "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|brackets|casesensitive|const|cut|fill|historylog|matchbrackets|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|operatingdir|preserve|punct|quickblank)\>" "^[[:space:]]*(set|unset)[[:space:]]+(quotestr|rebinddelete|rebindkeypad|regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace|wordbounds)\>"
2005-06-27 07:07:10 +04:00
# icolor green "^[[:space:]]*(set|unset|syntax)\>"
2003-09-08 03:54:57 +04:00
## colors
2005-06-27 07:47:52 +04:00
# icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
2005-06-27 07:07:10 +04:00
# icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
2003-09-08 03:54:57 +04:00
## strings
2005-06-27 07:07:10 +04:00
# icolor white "\"(\\.|[^\"])*\""
2003-09-08 03:54:57 +04:00
## comments
2005-06-27 16:25:17 +04:00
# icolor blue "^[[:space:]]*#.*$"