diff --git a/ChangeLog b/ChangeLog index b67f263c..880960bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ CVS code - General: - Translation updates (see po/ChangeLog for details). +- nano.1, nano.1.html: + - Add initialization file comments, change some options from + bracketed to underlined to emphasize that they are not + optional. GNU nano 1.1.99pre2 - 2003.02.03 - General: diff --git a/nano.1 b/nano.1 index a1069ad4..75347475 100644 --- a/nano.1 +++ b/nano.1 @@ -60,7 +60,7 @@ Write file in Mac format. .B \-N (\-\-noconvert) Disable automatic conversion of files from DOS/Mac format. .TP -.B \-Q \fI[str]\fP (\-\-quotestr=\fI[str]\fP) +.B \-Q \fIstr\fP (\-\-quotestr=\fIstr\fP) Set the quoting string for justifying. The default is "^([ \\t]*[|>:}#])+" if regular expression support is available, or "> " otherwise. @@ -73,13 +73,13 @@ Enable regular expression matching for search strings, as well as Enable smooth scrolling. Text will scroll line-by-line, instead of the usual chunk-by-chunk behavior. .TP -.B \-T \fI[num]\fP (\-\-tabsize=\fI[num]\fP) +.B \-T \fInum\fP (\-\-tabsize=\fInum\fP) Set the size (width) of a tab. .TP .B \-V (\-\-version) Show the current version number and author. .TP -.B \-Y \fI[str]\fP (\-\-syntax=\fI[str]\fP) +.B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP) Specify a specific syntax highlighting from the .nanorc to use, if available. .TP @@ -103,7 +103,7 @@ a new file, do not follow it. Good for editing files in /tmp, perhaps? .B \-m (\-\-mouse) Enable mouse support (if available for your system). .TP -.B \-o \fI[dir]\fP (\-\-operatingdir=\fI[dir]\fP) +.B \-o \fIdir\fP (\-\-operatingdir=\fIdir\fP) Set operating directory. Makes nano set up something similar to a chroot. .TP @@ -111,13 +111,13 @@ chroot. Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught by the terminal. .TP -.B \-r \fI[#cols]\fP (\-\-fill=\fI[#cols]\fP) -Wrap lines at column #cols. By default, this is the width of the +.B \-r \fIcols\fP (\-\-fill=\fIcols\fP) +Wrap lines at column \fIcols\fP. By default, this is the width of the screen, less eight. If this value is negative, wrapping will occur at -#cols from the right of the screen, allowing it to vary along with the -screen width if the screen is resized. +\fIcols\fP columns from the right of the screen, allowing the wrap point +to vary along with the screen width if resized. .TP -.B \-s \fI[prog]\fP (\-\-speller=\fI[prog]\fP) +.B \-s \fIprog\fP (\-\-speller=\fIprog\fP) Enable alternative spell checker command. .TP .B \-t (\-\-tempfile) @@ -137,6 +137,47 @@ Enable suspend ability. .TP .B \-a, \-b, \-e, \-f, \-g, \-j Ignored, for compatibility with Pico. +.SH INITIALIZATION FILE +\fBnano\fP will read initialization files in the following +order: $SYSCONFDIR/nanorc, then ~/.nanorc. Please see the example +file \fBnanorc.sample\fP which should be provided with \fBnano\fP. +All lines beginning with a hash symbol ( +# +) are considered comments +and will be ignored. The following commands are understood in the +initialization file: +.TP +.B [un]set \fIoption\fP [\fIvalue\fP] +Set (or unset) the flag \fIoption\fP. Any long option listed above can +be set or unset by removing the leading dashes (e.g. "set nowrap"). If +the option takes an argument it will be set to \fIvalue\fP. +.PP +\fBCOLOR SYNTAX HIGHLIGHTING\fP (if supported by your curses library) +.PP +.TP +.B syntax "\fIstr\fP" ["\fIfileregex\fP" ... ] +Defines a syntax named \fIstr\fP which can be activated via the +\fB-Y\fP flag, or will be automatically activated if the current +filename matches \fIfileregex\fP. All following \fBcolor\fP statements +will apply to \fIsyntax\fP until a new syntax is defined. +.TP +.B color \fIfgcolor\fP[,\fIbgcolor\fP] "\fIregex\fP" ... +For the currently defined syntax, display all expressions matching +\fIregex\fP with foreground color \fIfgcolor\fP and optional background +color \fIbgcolor\fP. Legal colors for foreground and background color are: +white, black, red, blue, green, yellow, magenta, and cyan. You may use +the prefix "bright" to force a stronger color highlight. If your +terminal supports transparency, not specifying a \fIbgcolor\fP tells +\fBnano\fP to attempt to use a transparent background. +.TP +.B color \fIfgcolor\fP[,\fIbgcolor\fP] start="\fIsr\fP" end="\fIer\fP" +Display expressions which start with \fIsr\fP and end with \fIer\fP +with foreground color \fIfgcolor\fP and optional +background color \fIbgcolor\fP. This allows syntax highlighting to span +multiple lines. Note that all subsequent instances of \fIsr\fP after +an initial \fIsr\fP is found will be highlighted until the first +instance of \fIer\fP. +\fI .SH NOTES \fBnano\fP will try to dump the buffer into an emergency file in some cases. Mainly, this will happen if \fBnano\fP receives a SIGHUP or diff --git a/nano.1.html b/nano.1.html index c06236a8..429f1fe2 100644 --- a/nano.1.html +++ b/nano.1.html @@ -80,7 +80,7 @@ Write file in Mac format.
+ +COLOR SYNTAX HIGHLIGHTING (if supported by your curses library) +
+ +