From 5ea694ebd16251821008d7cea6825822627d396f Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Tue, 4 Feb 2003 14:24:54 +0000 Subject: [PATCH] - nano.1, nano.1.html: - Add initialization file comments, change some options from bracketed to underlined to emphasize that they are not optional git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1424 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 +++ nano.1 | 59 +++++++++++++++++++++++++++++------ nano.1.html | 88 ++++++++++++++++++++++++++++++++++++++++++----------- 3 files changed, 125 insertions(+), 26 deletions(-) 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.
Disable automatic conversion of files from DOS/Mac format. -
-Q [str] (--quotestr=[str]) +
-Q str (--quotestr=str)
Set the quoting string for justifying. The default is @@ -96,7 +96,7 @@ 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. -
-T [num] (--tabsize=[num]) +
-T num (--tabsize=num)
Set the size (width) of a tab. @@ -104,7 +104,7 @@ Set the size (width) of a tab.
Show the current version number and author. -
-Y [str] (--syntax=[str]) +
-Y str (--syntax=str)
Specify a specific syntax highlighting from the .nanorc to use, if @@ -135,7 +135,7 @@ a new file, do not follow it. Good for editing files in /tmp, perhaps?
Enable mouse support (if available for your system). -
-o [dir] (--operatingdir=[dir]) +
-o dir (--operatingdir=dir)
Set operating directory. Makes nano set up something similar to a @@ -145,14 +145,14 @@ chroot.
Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught by the terminal. -
-r [#cols] (--fill=[#cols]) +
-r cols (--fill=cols)
-Wrap lines at column #cols. By default, this is the width of the +Wrap lines at column cols. 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. -
-s [prog] (--speller=[prog]) +cols columns from the right of the screen, allowing the wrap point +to vary along with the screen width if resized. +
-s prog (--speller=prog)
Enable alternative spell checker command. @@ -182,6 +182,59 @@ Enable suspend ability. Ignored, for compatibility with Pico.   +

INITIALIZATION FILE

+ +nano will read initialization files in the following +order: $SYSCONFDIR/nanorc, then ~/.nanorc. Please see the example +file nanorc.sample which should be provided with nano. +All lines beginning with a hash symbol ( +# +) are considered comments +and will be ignored. The following commands are understood in the +initialization file: +
+
[un]set option [value] + +
+Set (or unset) the flag option. 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 value. +
+

+ +COLOR SYNTAX HIGHLIGHTING (if supported by your curses library) +

+ +

+
syntax str [fileregex ... ] + +
+Defines a syntax named str which can be activated via the +-Y flag, or will be automatically activated if the current +filename matches fileregex. All following color statements +will apply to syntax until a new syntax is defined. +
color fgcolor[,bgcolor] regex ... + +
+For the currently defined syntax, display all expressions matching +regex with foreground color fgcolor and optional background +color bgcolor. 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 bgcolor tells +nano to attempt to use a transparent background. +
color fgcolor[,bgcolor] start=sr end=er + +
+Display expressions which start with sr and end with er +with foreground color fgcolor and optional +background color bgcolor. This allows syntax highlighting to span +multiple lines. Note that all subsequent instances of sr after +an initial sr is found will be highlighted until the first +instance of er. + +
+ 

NOTES

nano will try to dump the buffer into an emergency file in some @@ -193,7 +246,7 @@ name already exists in the current directory, ".save" and a number (e. ".save.1") will be suffixed to the current filename in order to make it unique. In multibuffer mode, nano will write all the open buffers to the respective emergency files. -  + 

BUGS

Please send any comments or bug reports to @@ -210,11 +263,11 @@ The nano mailing list is available from To subscribe, email to nano-devel-request@gnu.org with a subject of "subscribe". -  + 

HOMEPAGE

http://www.nano-editor.org -  + 

AUTHOR

Chris Allegretta <chrisa@asty.org>, et al (see AUTHORS and THANKS for @@ -231,15 +284,16 @@ used by others).
SYNOPSIS
DESCRIPTION
OPTIONS
-
NOTES
-
BUGS
-
HOMEPAGE
-
AUTHOR
+
INITIALIZATION FILE
+
NOTES
+
BUGS
+
HOMEPAGE
+
AUTHOR

This document was created by man2html, using the manual pages.
-Time: 03:06:20 GMT, January 17, 2003 +Time: 14:15:34 GMT, February 04, 2003 -- 2.39.5