From: Jordi Mallach Date: Sun, 7 Sep 2003 00:44:12 +0000 (+0000) Subject: Major package reorganization: X-Git-Tag: v1.3.0~31 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=298b975264724b5adb72667f59a2f18cc14ff08f;p=nano.git Major package reorganization: - Move code to src/. - Move docs to doc/: + texi doc to doc/texinfo/ + original manual pages to doc/man/ + translated manual pages to doc/man/xx/ git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1543 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/.cvsignore b/.cvsignore index d56f5e8f..4a6c20a2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -18,10 +18,7 @@ depcomp install-sh missing mkinstalldirs -nano -nano.info nano.spec stamp-h stamp-h.in stamp-h1 -texinfo.tex diff --git a/ChangeLog b/ChangeLog index cf475c90..c71949d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -31,6 +31,8 @@ CVS code - disabled if justification is disabled. (DLR) - Make sure the "historylog" option isn't included at all if NANO_SMALL is defined. (DLR) + - Source reorganization: move code to src/, docs to doc/. (Jordi) + - Translation updates (see po/ChangeLog for details). - files.c: do_browser() - Some of the Pico compatibility options in the file browser @@ -85,6 +87,7 @@ CVS code - interpreted as Ctrl-[character], and the support for Pico's Esc Esc [three-digit decimal ASCII code] input method, if applicable. (DLR) + - French translation by Jean-Philippe Guérard. - nano.1.html, nanorc.5.html: - Regenerated. (DLR) - nanorc.sample: diff --git a/Makefile.am b/Makefile.am index 1415d249..1b771f27 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,36 +1,11 @@ ## $Id$ AUTOMAKE_OPTIONS = gnu no-dependencies -DEFS= -DSYSCONFDIR=\"$(sysconfdir)\" +SUBDIRS = doc m4 po src -bin_PROGRAMS = nano -nano_SOURCES = color.c \ - cut.c \ - files.c \ - global.c \ - move.c \ - nano.c \ - nano.h \ - proto.h \ - rcfile.c \ - search.c \ - utils.c \ - winio.c - -man_MANS = nano.1 nanorc.5 -nano_LDADD = @GLIB_LIBS@ @LIBINTL@ - -info_TEXINFOS = nano.texi -MAKEINFO = makeinfo --no-split EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS \ README THANKS TODO UPGRADE config.rpath install-sh missing \ - mkinstalldirs nano.1.html nanorc.5.html faq.html \ - nanorc.sample nano.spec $(man_MANS) - -SUBDIRS = po m4 - -localedir = $(datadir)/locale -INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@ + mkinstalldirs nano.spec ACLOCAL_AMFLAGS = -I m4 diff --git a/TODO b/TODO index 8c6f11d2..c615348c 100644 --- a/TODO +++ b/TODO @@ -13,6 +13,7 @@ For version 1.4: (^R^X^X)(requires figuring out when to keep cursor pos and when not to). - Fix resetstatuspos global which we shouldn't have. +- Rewrite the nano FAQ in SGML. Old requests: diff --git a/color.c b/color.c deleted file mode 100644 index e8aacced..00000000 --- a/color.c +++ /dev/null @@ -1,131 +0,0 @@ -/* $Id$ */ -/************************************************************************** - * color.c * - * * - * Copyright (C) 1999-2003 Chris Allegretta * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2, or (at your option) * - * any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * - **************************************************************************/ - -#include "config.h" - -#include -#include -#include -#include -#include -#include -#include -#include "proto.h" -#include "nano.h" - -#ifdef ENABLE_COLOR - -/* For each syntax list entry, we go through the list of colors and - * assign color pairs. */ -void set_colorpairs(void) -{ - const syntaxtype *this_syntax = syntaxes; - - for(; this_syntax != NULL; this_syntax = this_syntax->next) { - colortype *this_color = this_syntax->color; - int color_pair = 1; - - for(; this_color != NULL; this_color = this_color->next) { - const colortype *beforenow = this_syntax->color; - - for(; beforenow != NULL && beforenow != this_color && - (beforenow->fg != this_color->fg || - beforenow->bg != this_color->bg || - beforenow->bright != this_color->bright); - beforenow = beforenow->next) - ; - - if (beforenow != NULL && beforenow != this_color) - this_color->pairnum = beforenow->pairnum; - else { - this_color->pairnum = color_pair; - color_pair++; - } - } - } -} - -void do_colorinit(void) -{ - if (has_colors()) { - const colortype *tmpcolor = NULL; -#ifdef HAVE_USE_DEFAULT_COLORS - int defok; -#endif - - start_color(); - /* Add in colors, if available */ - -#ifdef HAVE_USE_DEFAULT_COLORS - defok = use_default_colors() != ERR; -#endif - - for (tmpcolor = colorstrings; tmpcolor != NULL; - tmpcolor = tmpcolor->next) { - short background = tmpcolor->bg; - - if (background == -1) -#ifdef HAVE_USE_DEFAULT_COLORS - if (!defok) -#endif - background = COLOR_BLACK; - - init_pair(tmpcolor->pairnum, tmpcolor->fg, background); - -#ifdef DEBUG - fprintf(stderr, "Running %s with fg = %d and bg = %d\n", - "init_pair()", tmpcolor->fg, tmpcolor->bg); -#endif - } - } -} - -/* Update the color information based on the current filename. */ -void update_color(void) -{ - const syntaxtype *tmpsyntax; - - colorstrings = NULL; - for (tmpsyntax = syntaxes; tmpsyntax != NULL; tmpsyntax = tmpsyntax->next) { - const exttype *e; - - for (e = tmpsyntax->extensions; e != NULL; e = e->next) { - /* Set colorstrings if we matched the extension regex */ - if (!regexec(&e->val, filename, 0, NULL, 0)) - colorstrings = tmpsyntax->color; - - if (colorstrings != NULL) - break; - } - } - - /* if we haven't found a match, use the override string */ - if (colorstrings == NULL && syntaxstr != NULL) { - for (tmpsyntax = syntaxes; tmpsyntax != NULL; - tmpsyntax = tmpsyntax->next) { - if (!strcasecmp(tmpsyntax->desc, syntaxstr)) - colorstrings = tmpsyntax->color; - } - } - do_colorinit(); -} - -#endif /* ENABLE_COLOR */ diff --git a/configure.ac b/configure.ac index da0ef414..4e17621b 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ # $Id$ AC_INIT([GNU Nano], [1.2.99-cvs], [nano-devel@gnu.org], [nano]) -AC_CONFIG_SRCDIR([nano.c]) +AC_CONFIG_SRCDIR([src/nano.c]) AM_INIT_AUTOMAKE AM_CONFIG_HEADER([config.h:config.h.in]) @@ -347,5 +347,16 @@ then LDFLAGS="$LDFLAGS $glib_libs" fi -AC_CONFIG_FILES([Makefile m4/Makefile po/Makefile.in nano.spec]) +AC_CONFIG_FILES([ +Makefile +doc/Makefile +doc/man/Makefile +doc/man/fr/Makefile +doc/texinfo/Makefile +m4/Makefile +po/Makefile.in +src/Makefile +nano.spec +]) + AC_OUTPUT diff --git a/cut.c b/cut.c deleted file mode 100644 index 80af25ca..00000000 --- a/cut.c +++ /dev/null @@ -1,494 +0,0 @@ -/* $Id$ */ -/************************************************************************** - * cut.c * - * * - * Copyright (C) 1999-2003 Chris Allegretta * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2, or (at your option) * - * any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * * - **************************************************************************/ - -#include "config.h" - -#include -#include -#include -#include -#include "proto.h" -#include "nano.h" - -static int marked_cut; /* Is the cutbuffer from a mark? */ - -#ifndef NANO_SMALL -static int concatenate_cut; /* Should we add this cut string to the - end of the last one? */ -#endif - -static filestruct *cutbottom = NULL; - /* Pointer to end of cutbuffer */ - -filestruct *get_cutbottom(void) -{ - return cutbottom; -} - -void add_to_cutbuffer(filestruct *inptr) -{ -#ifdef DEBUG - fprintf(stderr, "add_to_cutbuffer() called with inptr->data = %s\n", - inptr->data); -#endif - - if (cutbuffer == NULL) { - cutbuffer = inptr; - inptr->prev = NULL; -#ifndef NANO_SMALL - } else if (concatenate_cut && !ISSET(JUSTIFY_MODE)) { - /* Just tack the text in inptr onto the text in cutbottom, - unless we're backing up lines while justifying text. */ - cutbottom->data = charealloc(cutbottom->data, - strlen(cutbottom->data) + strlen(inptr->data) + 1); - strcat(cutbottom->data, inptr->data); - return; -#endif - } else { - cutbottom->next = inptr; - inptr->prev = cutbottom; - } - - inptr->next = NULL; - cutbottom = inptr; -} - -#ifndef NANO_SMALL -/* Cut a marked segment instead of a whole line. - * - * The first cut character is top->data[top_x]. Unless top == bot, the - * last cut line has length bot_x. That is, if bot_x > 0 then we cut to - * bot->data[bot_x - 1]. - * - * destructive is whether to actually modify the file structure, if not - * then just copy the buffer into cutbuffer and don't pull it from the - * file. - * - * If destructive, then we maintain totsize, totlines, filebot, the - * magic line, and line numbers. Also, we set current and current_x so - * the cursor will be on the first character after what was cut. We do - * not do any screen updates. */ -void cut_marked_segment(filestruct *top, size_t top_x, filestruct *bot, - size_t bot_x, int destructive) -{ - filestruct *tmp, *next; - size_t newsize; - - if (top == bot && top_x == bot_x) - return; - assert(top != NULL && bot != NULL); - - /* Make top be no later than bot. */ - if (top->lineno > bot->lineno) { - filestruct *swap = top; - int swap2 = top_x; - - top = bot; - bot = swap; - - top_x = bot_x; - bot_x = swap2; - } else if (top == bot && top_x > bot_x) { - /* And bot_x can't be an earlier character than top_x. */ - int swap = top_x; - - top_x = bot_x; - bot_x = swap; - } - - /* Make the first cut line manually. */ - tmp = copy_node(top); - newsize = (top == bot ? bot_x - top_x : strlen(top->data + top_x)); - memmove(tmp->data, top->data + top_x, newsize); - null_at(&tmp->data, newsize); - add_to_cutbuffer(tmp); - - /* And make the remainder line manually too. */ - if (destructive) { - current_x = top_x; - totsize -= newsize; - totlines -= bot->lineno - top->lineno; - - newsize = top_x + strlen(bot->data + bot_x) + 1; - if (top == bot) { - /* In this case, the remainder line is shorter, so we must - move text from the end forward first. */ - memmove(top->data + top_x, bot->data + bot_x, - newsize - top_x); - top->data = charealloc(top->data, newsize); - } else { - totsize -= bot_x + 1; - - /* Here, the remainder line might get longer, so we - realloc() it first. */ - top->data = charealloc(top->data, newsize); - memmove(top->data + top_x, bot->data + bot_x, - newsize - top_x); - } - } - - if (top == bot) { -#ifdef DEBUG - dump_buffer(cutbuffer); -#endif - return; - } - - tmp = top->next; - while (tmp != bot) { - next = tmp->next; - if (!destructive) - tmp = copy_node(tmp); - else - totsize -= strlen(tmp->data) + 1; - add_to_cutbuffer(tmp); - tmp = next; - } - - /* Make the last cut line manually. */ - tmp = copy_node(bot); - null_at(&tmp->data, bot_x); - add_to_cutbuffer(tmp); -#ifdef DEBUG - dump_buffer(cutbuffer); -#endif - - if (destructive) { - top->next = bot->next; - if (top->next != NULL) - top->next->prev = top; - delete_node(bot); - renumber(top); - current = top; - if (bot == filebot) { - filebot = top; - assert(bot_x == 0); - if (top_x > 0) - new_magicline(); - } - } -#ifdef DEBUG - dump_buffer(cutbuffer); -#endif -} -#endif - -int do_cut_text(void) -{ - filestruct *fileptr; -#ifndef NANO_SMALL - int dontupdate = 0; -#endif - - assert(current != NULL && current->data != NULL); - - check_statblank(); - - if (!ISSET(KEEP_CUTBUFFER)) { - free_filestruct(cutbuffer); - cutbuffer = NULL; - marked_cut = 0; -#ifndef NANO_SMALL - concatenate_cut = 0; -#endif -#ifdef DEBUG - fprintf(stderr, "Blew away cutbuffer =)\n"); -#endif - } - - /* You can't cut the magic line except with the mark. But - trying does clear the cutbuffer if KEEP_CUTBUFFER is not set. */ - if (current == filebot -#ifndef NANO_SMALL - && !ISSET(MARK_ISSET) -#endif - ) - return 0; - - SET(KEEP_CUTBUFFER); - -#ifndef NANO_SMALL - if (ISSET(CUT_TO_END) && !ISSET(MARK_ISSET)) { - assert(current_x >= 0 && current_x <= strlen(current->data)); - - if (current->data[current_x] == '\0') { - /* If the line is empty and we didn't just cut a non-blank - line, create a dummy line and add it to the cutbuffer */ - if (marked_cut != 1 && current->next != filebot) { - filestruct *junk = make_new_node(current); - - junk->data = charalloc(1); - junk->data[0] = '\0'; - add_to_cutbuffer(junk); -#ifdef DEBUG - dump_buffer(cutbuffer); -#endif - } - - do_delete(); - marked_cut = 2; - return 1; - } else { - SET(MARK_ISSET); - - mark_beginx = strlen(current->data); - mark_beginbuf = current; - dontupdate = 1; - } - } - - if (ISSET(MARK_ISSET)) { - /* Don't do_update() and move the screen position if the marked - area lies entirely within the screen buffer */ - dontupdate |= current->lineno >= edittop->lineno && - current->lineno <= editbot->lineno && - mark_beginbuf->lineno >= edittop->lineno && - mark_beginbuf->lineno <= editbot->lineno; - cut_marked_segment(current, current_x, mark_beginbuf, - mark_beginx, 1); - - placewewant = xplustabs(); - UNSET(MARK_ISSET); - - /* If we just did a marked cut of part of a line, we should add - the first line of any cut done immediately afterward to the - end of this cut, as Pico does. */ - if (current == mark_beginbuf && current_x < strlen(current->data)) - concatenate_cut = 1; - marked_cut = 1; - if (dontupdate) - edit_refresh(); - else - edit_update(current, CENTER); - set_modified(); - - return 1; - } -#endif /* !NANO_SMALL */ - - totlines--; - totsize -= strlen(current->data) + 1; - fileptr = current; - current = current->next; - current->prev = fileptr->prev; - add_to_cutbuffer(fileptr); -#ifdef DEBUG - dump_buffer(cutbuffer); -#endif - - if (fileptr == fileage) - fileage = current; - else - current->prev->next = current; - - if (fileptr == edittop) - edittop = current; - - renumber(current); - current_x = 0; - edit_refresh(); - set_modified(); - marked_cut = 0; -#ifndef NANO_SMALL - concatenate_cut = 0; -#endif - placewewant = 0; - return 1; -} - -int do_uncut_text(void) -{ - filestruct *tmp = current, *fileptr = current; - filestruct *newbuf = NULL, *newend = NULL; - char *tmpstr, *tmpstr2; - filestruct *hold = current; - int i; - - wrap_reset(); - check_statblank(); - if (cutbuffer == NULL || fileptr == NULL) - return 0; /* AIEEEEEEEEEEEE */ - - /* If we're uncutting a previously non-marked block, uncut to end if - we're not at the beginning of the line. If we are at the - beginning of the line, set placewewant to 0. Pico does both of - these. */ - if (marked_cut == 0) { - if (current_x != 0) - marked_cut = 2; - else - placewewant = 0; - } - - /* If we're going to uncut on the magicline, always make a new - magicline in advance. */ - if (current->next == NULL) - new_magicline(); - - if (marked_cut == 0 || cutbuffer->next != NULL) - { - newbuf = copy_filestruct(cutbuffer); - for (newend = newbuf; newend->next != NULL && newend != NULL; - newend = newend->next) - totlines++; - } - - /* Hook newbuf into fileptr */ - if (marked_cut != 0) { - int recenter_me = 0; - /* Should we eventually use edit_update(CENTER)? */ - - /* If there's only one line in the cutbuffer */ - if (cutbuffer->next == NULL) { - size_t buf_len = strlen(cutbuffer->data); - size_t cur_len = strlen(current->data); - - current->data = charealloc(current->data, cur_len + buf_len + 1); - memmove(current->data + current_x + buf_len, - current->data + current_x, cur_len - current_x + 1); - strncpy(current->data + current_x, cutbuffer->data, buf_len); - /* Use strncpy() to not copy the terminal '\0'. */ - - current_x += buf_len; - totsize += buf_len; - - placewewant = xplustabs(); - update_cursor(); - } else { /* yuck -- no kidding! */ - tmp = current->next; - /* New beginning */ - tmpstr = charalloc(current_x + strlen(newbuf->data) + 1); - strncpy(tmpstr, current->data, current_x); - strcpy(&tmpstr[current_x], newbuf->data); - totsize += strlen(newbuf->data) + strlen(newend->data) + 1; - - /* New end */ - tmpstr2 = charalloc(strlen(newend->data) + - strlen(¤t->data[current_x]) + 1); - strcpy(tmpstr2, newend->data); - strcat(tmpstr2, ¤t->data[current_x]); - - free(current->data); - current->data = tmpstr; - current->next = newbuf->next; - newbuf->next->prev = current; - delete_node(newbuf); - - current_x = strlen(newend->data); - placewewant = xplustabs(); - free(newend->data); - newend->data = tmpstr2; - - newend->next = tmp; - - /* If tmp isn't null, we're in the middle: update the - prev pointer. If it IS null, we're at the end; update - the filebot pointer */ - - if (tmp != NULL) - tmp->prev = newend; - else { - /* Fix the editbot pointer too */ - if (editbot == filebot) - editbot = newend; - filebot = newend; - new_magicline(); - } - - /* Now why don't we update the totsize also */ - for (tmp = current->next; tmp != newend; tmp = tmp->next) - totsize += strlen(tmp->data) + 1; - - current = newend; - if (editbot->lineno < newend->lineno) - recenter_me = 1; - } - - /* If marked cut == 2, that means that we're doing a cut to end - and we don't want anything else on the line, so we have to - screw up all the work we just did and separate the line. - There must be a better way to do this, but not at 1AM on a - work night. */ - - if (marked_cut == 2) { - tmp = make_new_node(current); - tmp->data = mallocstrcpy(NULL, current->data + current_x); - splice_node(current, tmp, current->next); - null_at(¤t->data, current_x); - current = current->next; - current_x = 0; - placewewant = 0; - - /* Extra line added, update stuff */ - totlines++; - totsize++; - } - /* Renumber from BEFORE where we pasted ;) */ - renumber(hold); - -#ifdef DEBUG - dump_buffer(fileage); - dump_buffer(cutbuffer); -#endif - set_modified(); - if (recenter_me) - edit_update(current, CENTER); - else - edit_refresh(); - return 0; - } - - if (fileptr != fileage) { - tmp = fileptr->prev; - tmp->next = newbuf; - newbuf->prev = tmp; - } else - fileage = newbuf; - totlines++; /* Unmarked uncuts don't split lines */ - - /* This is so uncutting at the top of the buffer will work => */ - if (current_y == 0) - edittop = newbuf; - - /* Connect the end of the buffer to the filestruct */ - newend->next = fileptr; - fileptr->prev = newend; - - /* Recalculate size *sigh* */ - for (tmp = newbuf; tmp != fileptr; tmp = tmp->next) - totsize += strlen(tmp->data) + 1; - - i = editbot->lineno; - renumber(newbuf); - /* Center the screen if we've moved beyond the line numbers of both - the old and new editbots */ - if (i < newend->lineno && editbot->lineno < newend->lineno) - edit_update(fileptr, CENTER); - else - edit_refresh(); - -#ifdef DEBUG - dump_buffer_reverse(); -#endif - - set_modified(); - return 1; -} diff --git a/doc/.cvsignore b/doc/.cvsignore new file mode 100644 index 00000000..282522db --- /dev/null +++ b/doc/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 00000000..a83144dd --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = man texinfo + +EXTRA_DIST = faq.html nanorc.sample diff --git a/doc/faq.html b/doc/faq.html new file mode 100644 index 00000000..d5233b40 --- /dev/null +++ b/doc/faq.html @@ -0,0 +1,267 @@ + + + + The GNU nano editor FAQ + + + + +

The nano FAQ

+

Table of Contents

+

1. General

+

1.1 About this FAQ
+ 1.2. How do I contribute to it?
+ 1.3. What is GNU nano?
+ 1.4. What is the history behind nano?
+ 1.5. Why the name change from TIP?
+ 1.6. What is the current version of nano?
+ 1.7. I want to read the manpage without having to download the program!

+

2. Where to get GNU nano.

+

2.1. FTP and WWW sites that carry nano.
+ 2.2. RedHat and derivatives (.rpm) packages.
+ 2.3. Debian (.deb) packages.
+ 2.4. By CVS (for the brave).

+

3. Installation and Configuration

+

3.1. How do I install the RPM or DEB package?
+ 3.2. Compiling from source: WHAT THE HECK DO I DO NOW?
+ 3.3. Why does everything go into /usr/local?
+ 3.4. I get errors about 'bindtextdomain','gettext' and/or 'gettextdomain'. What can I do about it?
+ 3.5. Nano should automatically run strip on the binary when installing it!
+ 3.6. How can I make the executable smaller? This is too bloated!
+ 3.7. Tell me more about this multibuffer stuff!
+ 3.8. How do I make a .nanorc file that nano will read when I start it?

+

4. Running

+

4.1. Ack! My backspace/delete/enter/double bucky/meta key doesn't seem to work! What can I do?
+ 4.2. Nano crashes when I type <insert keystroke here>!
+ 4.3. Nano crashes when I resize my window. How can I fix that?
+ 4.4. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?
+ 4.5a. [version 1.1.12 and earlier] When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!
+ 4.5b. [version 1.2.2 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?
+ 4.6. I get the message "NumLock glitch detected. Keypad will malfunction with NumLock off." What gives?
+ 4.7. How do I make nano my default editor (in Pine, mutt, etc.)?
+ 4.8. I've compiled nano with color support, but I don't see any color when I run it!

+

5. Internationalization

+

5.1. There's no translation for my language!
+ 5.2. I don't like the translation for <x> in my language. How can I fix it?

+

6. Advocacy and Licensing

+

6.1. Why should I use nano instead of Pico?
+ 6.2. Why should I use Pico instead of nano?
+ 6.3. What is so bad about the Pine license?
+ 6.4. Okay, well what mail program should I use then?
+ 6.5. Why doesn't UW simply change their license?
+ 6.6. What if tomorrow UW changes the license to be truly Free Software?

+

7. Miscellaneous

+

7.1. Nano related mailing lists.
+ 7.2. I want to send the development team a big load of cash (or just a thank you).
+ 7.3. How do I submit a patch?
+ 7.4. How do I join the development team?
+ 7.5. Can I have CVS write access?

+

8. ChangeLog

+
+

1. General

+

1.1 About this FAQ

+

This FAQ was written and is maintained by Chris Allegretta <chrisa@asty.org>, who also happens to be the creator of nano. Maybe someone else will volunteer to maintain this FAQ someday, who knows...

+

1.2. How do I contribute to it?

+

Your best bet is to send it to the nano email address, nano@nano-editor.org and if it is useful enough it will be included in future versions.

+

1.3. What is GNU nano?

+

GNU nano is designed to be a free replacement for the Pico text editor, part of the Pine email suite from The University of Washington. It aims to "emulate Pico as closely as possible and perhaps include extra functionality".

+

1.4. What is the history behind nano?

+

Funny you should ask!

+

In the beginning...

+

For years Pine was THE program used to read email on a Unix system. The Pico text editor is the portion of the program one would use to compose his or her mail messages. Many beginners to Unix flocked to Pico and Pine because of their well organized, easy to use interfaces. With the proliferation of GNU/Linux in the mid to late 90's, many University students became intimately familiar with the strengths (and weaknesses) of Pine and Pico.

+

Then came Debian...

+

The Debian GNU/Linux distribution, known for its strict standards in distributing truly "free" software (i.e. software with no restrictions on redistribution), would not include a binary package for Pine or Pico. Many people had a serious dilemma: they loved these programs, but they were not truly free software in the GNU sense of the word.

+

The event...

+

It was in late 1999 when Chris Allegretta (our hero) was yet again complaining to himself about the less-than-perfect license Pico was distributed under, the 1000 makefiles that came with it and how just a few small improvements could make it the Best Editor in the World (TM). Having been a convert from Slackware to Debian, he missed having a simple binary package that included Pine and Pico, and had grown tired of downloading them himself.

+

Finally something snapped inside and Chris coded and hacked like a madman for many hours straight one weekend to make a (barely usable) Pico clone, at the time called TIP (Tip Isn't Pico). The program could not be invoked without a filename, could not save files, had no help menu, spell checker, and so forth. But over time it improved, and with the help of a few great coders it matured to the (hopefully) stable state it is today.

+

In February 2001, nano was declared an official GNU program by Richard Stallman. Nano also reached its first production release on March 22, 2001.

+

1.5. Why the name change from TIP?

+

On January 10, 2000, TIP was officially renamed to nano because of a namespace conflict with another program called 'tip'. The original 'tip' program "establishes a full duplex terminal connection to a remote host", and was included with many older Unix systems (and newer ones like Solaris). The conflict was not noticed at first because there is no 'tip' utility included with most GNU/Linux distributions (where nano was developed).

+

1.6. What is the current version of nano?

+

The current version of nano *should* be 1.2.2. Of course you should always check the nano homepage to see what the latest and greatest version is.

+

1.7. I want to read the man page without having to download the program!

+

Jeez, demanding, aren't we? Okay, look here.

+
+

2. Where to get GNU nano.

+

2.1. FTP and WWW sites that carry nano.

+

The nano distribution can be downloaded at the following fine web and ftp sites:

+ +
+

2.2. RedHat and derivatives (.rpm) packages.

+
+ +

Additionally, check out the RedHat contribs section at:

+ +
+

2.3. Debian (.deb) packages.

+

Debian users can check out the current nano packages for:

+ +

You can also have a look at the Package Pool to see all the available binary and source packages.

+

Note that versions < 0.9.10 are probably not for those wanting to get serious work done, so if you are using Debian 2.2, check that you have updated to 2.2r3, which comes with nano 0.9.23. If you're tracking unstable, you probably have the newest version already.

+

2.4. By CVS (for the brave).

+

For the 'bleeding edge' current version of nano, you can use CVS to download the current source code. Note: believe it or not, by downloading code that has not yet stabilized into an official release, there could quite possibly be bugs, in fact the code may not even compile! Anyway, see the nano CVS page for info on anonymous CVS access to the nano source.

+
+

3. Installation and Configuration

+

3.1. How do install the RPM or DEB package?

+

It's simple really! As root, type rpm -Uvh nano-x.y.z-1.i386.rpm if you have a RedHat-ish system or dpkg -i nano_x.y.z-1.deb if you have a Debian-ish system, where x.y.z is the release of nano. There are other programs to install packages, and if you wish to use those, knock yourself out.

+

3.2. Compiling from source: WHAT THE HECK DO I DO NOW?

+

Okay, take a deep breath, this really isn't hard. Unpack the nano source with a command like:

+

tar -zxvf nano-x.y.z.tar.gz

+

If you get error messages about the -z option, try this:

+

gzip -dc nano-x.y.z.tar.gz | tar xvf -

+

(again, where x.y.z is the version number in question). Then you need to run configure with any options you might want (if any).

+

The average case is this:

+

cd nano-x.y.z/
+ ./configure
+ make
+ make install (as root, of course)

+

3.3. Why does everything go into /usr/local?

+

Well, that's what the configure script defaults to. If you wish to change this, simply do this:

+

./configure --prefix=/usr

+

to put nano into /usr/bin when you run make install.

+

3.4. I get errors about 'bindtextdomain', 'gettext' and/or 'gettextdomain'. What can I do about it?

+

Try doing a ./configure --with-included-gettext and see if that solves your problem. You may need to do a make clean; make to get it to work fully.

+

3.5. Nano should automatically run strip on the binary when installing it!

+

Actually, it does, but you have to use make install-strip. The default make install does not, and will not, run strip automatically.

+

3.6. How can I make the executable smaller? This is too bloated!

+

Actually, there are several parts of the editor that can be disabled. You can pass arguments to the configure script that disable certain features. Here's a brief list:

+
+  --disable-tabcomp       Disables tab completion code for a smaller binary
+  --disable-justify       Disable justify/unjustify function
+  --disable-speller       Disables spell checker function
+  --disable-help          Disables help function (^G)
+  --disable-browser       Disables mini file browser
+  --disable-wrapping      Disables all wrapping of text (and -w flag)
+  --disable-mouse         Disables mouse support (and -m flag)
+  --disable-operatingdir  Disable setting of operating directory
+

There's also the --enable-tiny option which disables everything above, as well as some larger chunks of the program (like the marker code that you use Control-^ to select with). Also, if you know you aren't going to be using other languages you can use --disable-nls to disable internationalization and save a few K to a few dozen K depending on if you have locale support on your system. And finally there's always good old strip to strip all debugging code and code that exists in libraries on your system.

+

If, on the other hand, you can't live without bells and whistles, you could try:

+
+  --enable-extra          Enable extra functions, including easter eggs
+  --enable-nanorc         Enable use of .nanorc file
+  --enable-color          Enables color and syntax highlighting
+  --enable-multibuffer    Enables having multiple file buffers open
+  --enable-all            Enables all of the above features
+

3.7. Tell me more about this multibuffer stuff!

+

To use multiple file buffers, you must be using nano 1.1.12 or newer, and you must have configured nano with --enable-multibuffer or --enable-extra (use nano -V to check). Then when you want to enable inserting a file into its own buffer instead of into the current file, just hit Meta-F, then insert the file as normal with ^R. If you always want files to be loaded into their own buffers, use the --multibuffer or -F flag when you invoke nano.

+

You can move between the buffers you have open with the Meta-< and Meta-> keys, or more easily with Meta-, and Meta-. (clear as mud, right? =-). When you have more than one file buffer open, the ^X shortcut will say "Close", instead of the normal "Exit" when only one buffer is open.

+

3.8. How do I make a .nanorc file that nano will read when I start it?

+
It's not hard at all! But, your version of nano must have been compiled with --enable-nanorc, and again must be version 1.1.12 or newer (use nano -V to check your version and compiled features). Then simply copy the nanorc.sample that came with the nano source or your nano package (most likely in /usr/doc/nano) to .nanorc in your home directory. If you didn't get one, the syntax is simple. Flags are turned on and off by using the word set and the getopt_long flag for the feature, for example "set pico" or "set nowrap".
+
+

4. Running

+

4.1. Ack! My backspace/delete/enter/double bucky/meta key doesn't seem to work! What can I do?

+

Try setting your $TERM variable to 'vt100'. Nano doesn't yet support every term entry under the sun.

+

Bourne shell users (like bash): export TERM=vt100
+ C Shell users (tcsh and csh): setenv TERM vt100

+

4.2. Nano crashes when I type <insert keystroke here>!

+

If you aren't trying some bizarre keystroke combination with some bizarre $TERM entry, chances are you have found a bug. You are welcome to submit it to the nano-devel list or to nano@nano-editor.org.

+

4.3. Nano crashes when I resize my window. How can I fix that?

+

Older versions of nano had this problem, please upgrade to a newer version (at least 0.9.9 would be great, 0.9.12 is recommended).

+

4.4. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?

+

The help (^G) and justify (^J) function were among the last to be written. To show the improvements that nano had over Pico (go to line # and replace), ^_ and ^\ were put on the shortcut list. Later, ^G came back in place of ^_ as it proved to be very valuable for new Unix users. If you use the -p option to nano (or hit Meta-P) you will get the same shortcuts at the bottom as Pico.

+ +

4.5a. [version 1.1.12 and earlier] When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!

+

In nano version 0.9.20, the default is to have a completely consistent user interface across all user input functions. This means that regardless of whether you're being asked for a filename to insert or write, or a string to search for, the previous value is already inserted before the cursor. If you prefer the old behavior, use the Pico emulation mode (-p or --pico) or just hit Meta-P while in nano (see the ^G help text for more details).

+

4.5b. [version 1.2.2 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?

+

It was decided that consistency was nice, but people are used to Pico's inconsistent behavior. Also, in version 1.1.99pre1, search and replace history was introduced. If you wish to edit your previous search/replace entry (or any previous entry), you can do so by hitting the up arrow to cycle through your history. This method allows the best of both worlds: You don't need to erase the previous string if you want to enter a new one, but you can with one keystroke recall previous entries for editing. Therefore there is now no "Pico mode", nano is and has always been a Pico clone, and clones by default should be compatible.

+

4.6. I get the message "NumLock glitch detected. Keypad will malfunction with NumLock off." What gives?

+

Nano (and actually almost all console editors) has issues when cycling the NumLock key in certain X terminals (rxvt, aterm, wterm, etc...). When you switch NumLock from on to off, you put the terminal into an "application mode" that changes what sequences are sent by the keypad. These sequences vary sufficiently from terminal to terminal that it is nearly impossible to work around them from within nano.

+

In a nutshell, if you want to be able to use the keypad with the arrow and page up/down functionality, you have to exit nano and reset your terminal (presumably with "reset" or "stty sane" or similar) and then run nano again with NumLock off. If you know an easier way to restore "normal mode", please mail nano@nano-editor.org.

+

4.7. How do I make nano my default editor (in Pine, mutt, etc.)?

+

You need to make nano your $EDITOR. If you want this to be saved, you should put a line like this in your .bashrc if you use bash (or .zshrc if you believe in zsh):

+

export EDITOR=/usr/local/bin/nano

+

or if you use tcsh put this in your .cshrc file:

+

setenv EDITOR /usr/local/bin/nano

+

Change /usr/local/bin/nano to wherever nano is installed on your system. Type "which nano" to find out. This will not take effect until the next time you login. So log out and back in again.

+

Then on top that if you use Pine you must go into setup (type S at the main menu), then configure (type C). Hit enter on the lines that say:

+

[ ] enable-alternate-editor-cmd
+ [ ] enable-alternate-editor-implicitly

+

Then exit (E) and select Yes (Y).

+

Mutt users should see an effect immediately the next time you log in, no further configuration is needed. However, if you want to let people know you use nano to compose your email messages, you can put a line like this in your .muttrc:

+

my_hdr X-Composer: nano x.y.z

+

Again, replace x.y.z with the version of nano you use.

+

4.8. I've compiled nano with color support, but I don't see any color when I run it!

+

If you want nano to actually use color, you have to specify the color configurations you want it to use in your .nanorc. Some example configurations are in the nanorc.sample that comes with the nano source or your nano package. See Section 3.8.

+
+

5. Internationalization

+

5.1. There's no translation for my language!

+

On June of 2001, GNU nano entered the Free Translation Project and since then, translations should be managed from there.

+

If there isn't a translation for your language, you could ask your language team to translate nano, or better still, join your team and do it yourself. Joining a team is easy. You just need to ask the TP coordinator to add you to your team, and send a translation disclaimer to the FSF (this is necessary as nano is an official GNU package, but it does not mean that you transfer the rights of your work to the FSF, it's just so the FSF can legally manage them).

+

In any case, translating nano is very easy. Just grab the nano.pot file from the latest and greatest nano distribution (it's in the po/ directory) and translate each line into your native language on the msgstr line. When you're done, you should send it to the TP's central po repository.

+

5.2. I don't like the translation for <x> in my language. How can I fix it?

+

The best way would probably be to e-mail the person listed in the Last-Translator: field in the <your_language>.po file with your suggested corrections and they can make the changes reach the nano-devel list.

+
+

6. Advocacy and Licensing

+

6.1. Why should I use nano instead of Pico?

+

There are many reasons to use nano instead of Pico, a more complete list can be found at the nano homepage.

+

6.2. Why should I use Pico instead of nano?

+

Again, check out the nano homepage for a good summary of reasons. It really is a matter of personal preference as to which editor you should use. If you're the type of person who likes using the original version of a program, then Pico is the editor for you. If you're looking for a few more features and a 'better' license as far as adding your own changes (sacrificing mailer integration with Pine), nano is the way to go.

+

6.3. What is so bad about the Pine license?

+

The U of W license for Pine and Pico is not considered truly Free Software according to both the Free Software Foundation and the Debian Free Software Guidelines. The main problem regards the limitations on distributing derived works: according to UW, you can distribute their software, and you can modify it, but you can not do both, i.e. distribute modified binaries.

+

6.4. Okay, well what mail program should I use then?

+

If you are looking to use a Free Software program similar to Pine and emacs is not your thing, you should definitely take a look at mutt. It is a full-screen, console based mail program that actually has a lot more flexibility than Pine, but has a keymap included in the distribution that allows you to use the same keystrokes as Pine would to send and receive mail. It's also licensed under the GPL.

+

6.5. Why doesn't UW simply change their license?

+

You're really not asking the right person here. I (Chris) waited a long time to see if UW would change their license because of the amount of high quality software being released and developed under the GPL without being taken advantage of by malicious corporate entities or other baddies, but no such luck so far.

+

6.6. What if tomorrow UW changes the license to be truly Free Software?

+

Honestly nothing would make me happier than to see that happen. Nano would continue to be developed independently until such time as Pico had all the features nano did or the projects merged. That just does not seem very likely given that there has been no sign of any changes in the past few years in a positive direction.

+
+

7. Miscellaneous

+

7.1. Nano related mailing lists.

+

There are three mailing lists for nano hosted at Savannah, info-nano, help-nano and nano-devel. Info-nano is a very low traffic list where new versions of nano are announced (surprise!) Help-nano is for getting help with the editor without needing to hear all of the development issues surrounding it. Nano-devel is a normally low, sometimes high traffic list for discussing the present and future development of nano. Here are links to where you can sign up for a given list:

+

info-nano - http://mail.gnu.org/mailman/listinfo/info-nano/
+ help-nano - http://mail.gnu.org/mailman/listinfo/help-nano/
+ nano-devel - http://mail.gnu.org/mailman/listinfo/nano-devel/

+

7.2. I want to send the development team a big load of cash (or just a thank you).

+

That's fine. Send it our way! Better yet, fix a bug in the program or implement a cool feature and send us that instead (though cash is fine too).

+

7.3. How do I submit a patch?

+

See Section 7.2.

+

7.4. How do I join the development team?

+

The easiest way is to consistently send in good patches that add some needed functionality, fix a bug or two and/or make the program more optimized/efficient. Then ask nicely and you will probably be added to the Savannah development list and be given CVS write access after awhile. There is a lot of responsibility that goes along with being a team member, so don't think it's just something to add to your resume.

+

7.5. Can I have CVS write access?

+

Re-read Section 7.4 and you should know the answer.

+

8. ChangeLog

+
+

+2003/07/02 - Added question about nano's not showing color when it's compiled with color support (DLR; suggested by Jordi).
+2003/02/23 - Updated RPM links for nano 1.2.x. (DLR).
+2003/01/16 - Split section 4.5 into 4.5a and 4.5b for search string behavior. Added --enable-all docs.
+2002/12/28 - More misc. fixes (David Benbennick, DLR).
+2002/10/25 - Misc. fixes and link updates (DLR).
+2002/09/10 - Another typo fix (DLR).
+2002/05/15 - Typo fix (DLR).
+2001/12/26 - Misc. fixes (Aaron S. Hawley, DLR).
+2001/10/02 - Update for Free Translation Project.
+2001/10/02 - Assorted fixes, Debian additions.
+2001/06/30 - Silly typo fix.
+2001/05/05 - Spelling fixes by David Lawrence Ramsey.
+2001/05/02 - Misc fixes.
+2001/03/26 - Typo fix in an URL.
+2001/02/17 - Advocacy updates.
+2001/02/15 - Added GNU notes for 0.9.99pre3.
+2001/02/06 - Typo fixes.
+2001/01/14 - Added note about NumLock glitch.
+2001/01/10 - Linux -> GNU/Linux.
+2001/01/09 - Added "making exe smaller" section.
+2000/12/19 - Typo and assorted error fixes.
+2000/11/28 - Added blurb about make install-strip.
+2000/11/19 - Changed Debian frozen to stable.
+2000/11/18 - Previous string display (4.5).
+2000/09/27 - Moved addresses to nano-editor.org.
+2000/06/31 - Initial framework.

+

$Id$

+ + diff --git a/doc/man/.cvsignore b/doc/man/.cvsignore new file mode 100644 index 00000000..282522db --- /dev/null +++ b/doc/man/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am new file mode 100644 index 00000000..60f57307 --- /dev/null +++ b/doc/man/Makefile.am @@ -0,0 +1,5 @@ +SUBDIRS = fr + +man_MANS = nano.1 nanorc.5 + +EXTRA_DIST = nano.1.html nanorc.5.html $(man_MANS) diff --git a/doc/man/fr/.cvsignore b/doc/man/fr/.cvsignore new file mode 100644 index 00000000..282522db --- /dev/null +++ b/doc/man/fr/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/doc/man/fr/Makefile.am b/doc/man/fr/Makefile.am new file mode 100644 index 00000000..12267764 --- /dev/null +++ b/doc/man/fr/Makefile.am @@ -0,0 +1,5 @@ + +mandir = @mandir@/fr +man_MANS = nano.1 nanorc.5 + +EXTRA_DIST = $(man_MANS) diff --git a/doc/man/fr/nano.1 b/doc/man/fr/nano.1 new file mode 100644 index 00000000..050cd004 --- /dev/null +++ b/doc/man/fr/nano.1 @@ -0,0 +1,229 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" nano.1 is copyright (C) 1999, 2000, 2001, 2002, 2003 by +.\" Chris Allegretta +.\" +.\" (c) 2003 Jean-Philippe Guérard +.\" pour l'adaptation française +.\" +.\" This is free documentation, see the latest version of the GNU General +.\" Public License for copying conditions. There is NO warranty. +.\" +.\" Ce document est libre. Reportez-vous à la dernière version de la +.\" licence publique générale GNU (GNU GPL) pour connaître ses +.\" conditions d'utilisation. AUCUNE garantie n'est offerte. +.\" +.TH NANO 1 "19 juin 2003 (v.f. du 25 août 2003)" +.\" Please adjust this date whenever revising the manpage. +.\" Merci de modifier ces dates à chaque mise à jour de cette page. + +.SH NOM +nano \- NAno un NOuvel éditeur, un clone libre et amélioré de Pico + +.SH SYNOPSIS +.B nano +.I [\+LIGNE]\ [options]\ [fichier] +.br + +.SH DESCRIPTION +Cette page de manuel décrit brièvement la commande \fBnano\fP. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invoke bold face and italics, +.\" respectively. +\fBnano\fP est un petit éditeur sympathique et libre, qui vise à remplacer +Pico, l'éditeur par défaut du paquet non-libre Pine. \fBnano\fP ne se +contentant pas de copier l'interface et l'ergonomie de Pico, il offre +également certaines fonctionnalités manquantes (ou désactivées par +défaut) de Pico. Ces fonctionnalités sont, par exemple, les fonctions de +recherche et de remplacement, et la possibilité de sauter directement à +un numéro de ligne. + +.SH OPTIONS +.TP +.B \+\fILIGNE\fP +Démarre avec le curseur positionné à la ligne numéro \fILIGNE\fP. +.TP +.B \-B (\-\-backup) +Lors de l'écriture d'un fichier, crée une copie de sécurité de la +version précédente, en ajoutant un tilde (~) au nom du fichier. +.TP +.B \-D (\-\-dos) +Écrit le fichier au format DOS. +.TP +.B \-F (\-\-multibuffer) +Active le mode multifichiers, autorisant l'édition simultanée de +plusieurs fichiers, si ce mode est disponible. +.TP +.B \-H (\-\-historylog) +Enregistre les chaînes ayant fait l'objet d'une recherche ou d'un +remplacement dans le fichier +.I ~/.nano_history +afin de permettre leur réutilisation. Ceci n'est possible que si +.B nano +est capable d'utiliser les fichiers +nanorc. +.TP +.B \-I (\-\-ignorercfiles) +N'utilise pas les fichiers +.I $SYSCONFDIR/nanorc +et +.IR ~/.nanorc , +même si +.B nano +est capable de les utiliser. +.TP +.B \-K (\-\-keypad) +Essaie au maximum de ne pas utiliser les appels keypad() de ncurses. +Utilisez ce paramètre si vous vous apercevez que les flèches du pavé +numérique ne fonctionnent pas sous nano. +.TP +.B \-M (\-\-mac) +Écrit le fichier au format Mac. +.TP +.B \-N (\-\-noconvert) +Désactive la conversion automatique des fichiers depuis les +formats Mac et DOS. +.TP +.B \-Q \fIchaîne\fP (\-\-quotestr=\fIchaîne\fP) +Définit le préfixe par défaut des citations. Nano utilise ce préfixe +pour réaliser une justification correcte des citations. +Si nano est capable d'utiliser des expressions rationnelles, le préfixe +par défaut sera "^([\ \\t]*[|>:}#])+", sinon, ce sera ">\ ". +.TP +.B \-R (\-\-regexp) +Active l'utilisation d'expressions rationnelles lors des recherches, +ainsi que la possibilité d'utiliser \\\fIn\fP dans les chaînes de +remplacement pour faire référence à la \fIn\fP-ième sous-expression du +motif de recherche, si cette fonction est disponible. +.TP +.B \-S (\-\-smooth) +Active le défilement progressif. Le texte défilera ligne-par-ligne au +lieu de défiler morceau-par-morceau. +.TP +.B \-T \fInombre\fP (\-\-tabsize=\fInombre\fP) +Définit la taille (largeur) des tabulations. +.TP +.B \-V (\-\-version) +Affiche le numéro de version et l'auteur. +.TP +.B \-Y \fIchaîne\fP (\-\-syntax=\fIchaîne\fP) +Indique quel mode de colorisation syntaxique adopter, parmi les modes +définis dans le fichier +.IR .nanorc , +si cette fonctionnalité est disponible. +.TP +.B \-c (\-\-const) +Affiche en permanence la position du curseur. +.TP +.B \-h (\-\-help) +Affiche de la liste des options disponibles en ligne de commande. +.TP +.B \-i (\-\-autoindent) +Indentation automatique. Commence chaque nouvelle ligne au même niveau +que la ligne précédente. Utile pour l'édition de code source. +.TP +.B \-k (\-\-cut) +^K coupe le texte du curseur à la fin de la ligne, au lieu de couper la +ligne entière. +.TP +.B \-l (\-\-nofollow) +Si le fichier édité est un lien symbolique, remplace le lien par le +nouveau fichier, sans le suivre. Ce mode ne serait-il pas utile pour +éditer les fichiers de +.IR /tmp \ ? +.TP +.B \-m (\-\-mouse) +Active l'utilisation de la souris (si elle est disponible sur votre +système). +.TP +.B \-o \fIrépertoire\fP (\-\-operatingdir=\fIrépertoire\fP) +Définit le répertoire de travail. Demande à nano de mettre en place +quelque-chose de similaire à une cage chroot. +.TP +.B \-p (\-\-preserve) +Préserve les séquences XON et XOFF (^Q et ^S), afin qu'elle soient +reçues par le terminal. +.TP +.B \-r \fIcolonne\fP (\-\-fill=\fIcolonne\fP) +Passe automatiquement à la ligne à la colonne \fIcolonne\fP. Par défaut, +le passage à la ligne se fait à la taille de l'écran moins huit. Si la +valeur indiquée est négative, le point de passage à la ligne sera +calculé relativement au bord droit de l'écran. Cela permet de faire +varier le point de passage à la ligne lorsque l'on change la taille de +l'écran. +.TP +.B \-s \fIprogramme\fP (\-\-speller=\fIprogramme\fP) +Choix d'un correcteur orthographique de remplacement. +.TP +.B \-t (\-\-tempfile) +S'il a été modifié, le fichier sera sauvegardé automatiquement sans +demande de confirmation. Identique à l'option -t de Pico. +.TP +.B \-v (\-\-view) +Mode visualisation (lecture seule). +.TP +.B \-w (\-\-nowrap) +Désactive le passage automatique à la ligne. +.TP +.B \-x (\-\-nohelp) +Désactive la barre d'aide affichée en bas de l'écran. +.TP +.B \-z (\-\-suspend) +Autorise à suspendre l'éditeur. +.TP +.B \-a, \-b, \-e, \-f, \-g, \-j +Ignoré, pour être compatible avec Pico. + +.SH FICHIERS D'INITIALISATION +\fBnano\fP lit les fichiers d'initialisation dans l'ordre suivant\ : +\fI$SYSCONFDIR/nanorc\fP, puis \fI~/.nanorc\fP. Reportez-vous à la page +de manuel de \fBnanorc\fP(5) et au fichier-exemple \fInanorc.sample\fP +qui devrait être livré avec \fBnano\fP. + +.SH NOTES +Dans certains cas, \fBnano\fP essaiera de sauvegarder le fichier en +cours d'édition dans un fichier de secours. Cela arrivera +principalement si \fBnano\fP reçoit un signal SIGHUP ou SIGTERM, ou +bien se trouve à court de mémoire. Le nom de ce fichier de secours sera +\fInano.save\fP si le fichier en cours n'avait pas encore de nom, ou +sera composé du nom du fichier en cours suivi du suffixe «\ .save\ ». Si +un fichier de ce nom existe déjà dans le répertoire, un «\ .save\ » et +un nombre seront ajoutée à la fin du nom du fichier en cours afin de le +rendre unique (par exemple, «\ .save.1\ »). En mode multifichiers, +\fBnano\fP réalisera une sauvegarde de tous les fichiers en cours dans +leurs fichiers de secours respectifs. + +.SH BOGUES +Merci de nous faire parvenir vos commentaires et de nous signaler les +bogues, en écrivant, en anglais, à +.BR nano@nano-editor.org . + +N'hésitez pas à faire parvenir vos suggestions et commentaires relatifs +à la version française de \fBnano\fP à +.BR jean-philippe.guerard@corbeaunoir.org . + +La liste de discussion anglophone \fBnano\fP est disponible via +.BR nano-devel@gnu.org . +Pour vous abonner, envoyez un courrier électronique à +.BR nano-devel-request@gnu.org , +ayant pour objet «\ subscribe\ ». + +.SH SITE INTERNET +http://www.nano-editor.org/ + +.SH VOIR AUSSI +.PD 0 +.TP +\fBnanorc\fP(5) +.PP +\fI/usr/share/doc/nano/\fP (ou son équivalent sur votre système) + +.SH AUTEUR +Chris Allegretta et d'autres (voir les fichiers +\fIAUTHORS\fP et \fITHANKS\fP pour plus d'information). Cette page de +manuel a été initialement rédigée par Jordi Mallach + pour le système GNU Debian (mais elle peut être +utilisée par d'autres). + +.SH TRADUCTION +Jean-Philippe Guérard , 2003. diff --git a/doc/man/fr/nanorc.5 b/doc/man/fr/nanorc.5 new file mode 100644 index 00000000..eeefe205 --- /dev/null +++ b/doc/man/fr/nanorc.5 @@ -0,0 +1,198 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" nanorc.5 is Copyright (C) 2003 Free Software Foundation, Inc. +.\" +.\" (c) 2003 Jean-Philippe Guérard +.\" pour l'adaptation française +.\" +.\" This is free documentation, see the latest version of the GNU General +.\" Public License for copying conditions. There is NO warranty. +.\" +.\" Ce document est libre. Reportez-vous à la dernière version de la +.\" licence publique générale GNU (GNU GPL) pour connaître ses +.\" conditions d'utilisation. AUCUNE garantie n'est offerte. +.\" +.TH NANORC 5 "19 juin 2003 (v.f. du 25 août 2003)" +.\" Please adjust this date whenever revising the manpage. +.\" Merci de modifier ces dates à chaque mise à jour de cette page. + +.SH NAME +nanorc \- fichier de configuration de l'éditeur nano du projet GNU + +.SH DESCRIPTION +Cette page de manuel décrit brièvement le fichier de configuration de +l'éditeur \fBnano\fP du projet GNU. +.PP +\fBnano\fP est un petit éditeur sympathique et libre, qui vise à +remplacer Pico, l'éditeur par défaut du paquet non-libre Pine. +\fBnano\fP ne se contentant pas de copier l'interface et l'ergonomie de +Pico, il offre également certaines fonctionnalités manquantes (ou +désactivées par défaut) de Pico. Ces fonctionnalités sont, par exemple, +les fonctions de recherche et de remplacement, et la possibilité de +sauter directement à un numéro de ligne. +.PP +Le fichier \fInanorc\fP contient les paramètres par défaut de +\fBnano\fP. Lors de son démarrage, nano commence par lire le fichier de +configuration général \fI$SYSCONFDIR/nanorc\fP, puis lit le fichier de +configuration personnel de l'utilisateur \fI~/.nanorc\fP. + +.SH OPTIONS +Le fichier de configuration accepte une série de commandes «\ set\ » +(activer) et «\ unset\ » (désactiver), qui permettent de définir la +configuration de nano au démarrage sans avoir à utiliser d'options sur +la ligne de commande. +De plus, les mots clefs «\ syntax\ » (syntaxe) et «\ color\ » (couleur) +sont utilisés pour définir les règles de colorisation pour différents +motifs de texte. Nano lira une commande par ligne. + +Les options du fichier de configuration ont priorité sur les valeurs par +défaut utilisées par nano. Les options données sur la ligne de commande +permettent d'outrepasser les options du fichier de configuration. + +Les options sont désactivées (unset) par défaut, sauf les options +prenant un argument. + +Les commandes et arguments reconnus sont\ : + +.TP 3 +\fBset/unset autoindent\fP +Active l'indentation automatique. +.TP +\fBset/unset backup\fP +Crée des copie de sécurité appelées +.IR nom_du_fichier~ . +.TP +\fBset/unset const\fP +Affiche en permanence la position du curseur dans la barre +d'information. +.TP +\fBset/unset cut\fP +Par défaut, utilise ^K pour couper le texte du curseur à la fin de la +ligne, au lieu de couper la ligne entière. +.TP +\fBset fill \fIn\fP\fP +Passe automatiquement à la ligne à la colonne \fIn\fP. Si la valeur +indiquée est 0 ou moins, la longueur de la ligne sera égale à la largeur +de l'écran moins \fIn\fP. La valeur par défaut est -8. +.TP +\fBset/unset historylog\fP +Active l'utilisation de +.I ~/.nano_history +pour enregistrer et relire les chaînes ayant fait l'objet d'une +recherche ou d'un remplacement. +.TP +\fBset/unset keypad\fP +Utilise l'autre gestion du pavé numérique. +.TP +\fBset/unset multibuffer\fP +Permet de charger simultanément plusieurs fichiers. +.TP +\fBset/unset noconvert\fP +Pas de conversion depuis les formats DOS et Mac. +.TP +\fBset/unset nofollow\fP +Ne suit pas les liens symboliques lors de l'écriture des fichiers. +.TP +\fBset/unset nohelp\fP +Désactive la barre d'aide affichée en bas de l'écran. +.TP +\fBset/unset nowrap\fP +Désactive le passage automatique à la ligne. +.TP +\fBset operatingdir "\fIrépertoire\fP"\fP +\fBnano\fP ne lira et n'écrira des fichiers qu'à l'intérieur du +\fIrépertoire\fP et de ses sous-répertoires. De plus, celui-ci devient +le répertoire courant, afin que les fichiers soient écrits dans ce +dossier. Par défaut, cette fonction est désactivée. +.TP +\fBset/unset preserve\fP +Préserve les séquences XON et XOFF (^Q et ^S). +.TP +\fBset quotestr "\fIchaîne\fP"\fP +Définit le préfixe par défaut utilisé pour les citations dans les +courriers électroniques. Ce préfixe est utilisé pour réaliser une +justification correcte de ces citations. Il s'agira, si votre système le +permet, d'une «\ expression rationnelle étendue\ ». Dans le cas +contraire, il s'agira d'une chaîne de texte brut. Si vous disposez des +expressions rationnelles, la valeur par défaut sera\ : + + set quotestr "^([\ \\t]*[|>:}#])+" + +Sinon, ce sera ">\ ". Notez que le «\ \\t\ » ci-dessus correspond à un +caractère de tabulation. +.TP +\fBset/unset regexp\fP +Utilise par défaut des expressions rationnelles pour les recherches. +.TP +\fBset/unset smooth\fP +Active le défilement ligne-par-ligne du texte. +.TP +\fBset speller \fIprogramme\fP\fP +Utilise le correcteur orthographique \fIprogramme\fP au lieu du +correcteur intégré, qui s'appuie sur \fIspell\fP. +.TP +\fBset/unset suspend\fP +Autorise à suspendre nano avec ^Z. +.TP +\fBset tabsize \fIn\fP\fP +Utilise une largeur de tabulation de \fIn\fP au lieu de la valeur par +défaut (8). Cette valeur doit être supérieur à 0. +.TP +\fBset/unset tempfile\fP +S'il a été modifié, le fichier sera sauvegardé automatiquement +sans demande de confirmation. +.TP +\fBset/unset view\fP +Interdit la modification du fichier. +.TP +.B syntax "\fIchaîne\fP" ["\fImotif_de_fichier\fP" ... ] +Définit une syntaxe nommée \fIchaîne\fP qui pourra être activé via +l'option \fB-Y\fP, ou qui sera automatiquement activé si le nom du +fichier en cours correspond au \fImotif_de_fichier\fP. Toutes les +instructions de colorisation \fBcolor\fP suivantes s'appliqueront à cette +syntaxe, jusqu'à la définition d'une nouvelle syntaxe. +.TP +.B color \fIcouleur_texte\fP[,\fIcouleur_fond\fP] "\fImotif\fP" ... +Pour la syntaxe en cours, affiche toutes les expressions correspondant à +l'expression rationnelle \fImotif\fP en utilisant la couleur de texte +\fIcouleur_texte\fP et éventuellement la couleur de fond +\fIcouleur_fond\fP. Les couleurs acceptées par \fBnano\fP pour le +texte et le fond sont\ : \fIwhite\fP (blanc), \fIblack\fP (noir), +\fIred\fP (rouge), \fIblue\fP (bleu), \fIgreen\fP (vert), \fIyellow\fP +(jaune), \fImagenta\fP, et \fIcyan\fP. Vous pouvez ajouter à +ces couleurs le préfixe \fIbright\fP pour obtenir une couleur plus +lumineuse. Si votre terminal est capable de gérer la transparence, ne +pas spécifier de \fIcouleur_fond\fP indique à \fBnano\fP d'essayer +d'utiliser un fond transparent. +.TP +.B color \fIcouleur_texte\fP[,\fIcouleur_fond\fP] start="\fImotif_début\fP" end="\fImotif_fin\fP" +Affiche les expressions commençant par \fImotif_début\fP et se terminant +par \fImotif_fin\fP en utilisant la couleur de texte \fIcouleur_texte\fP +et éventuellement la couleur de fond \fIcouleur_fond\fP. Cela permet à +la colorisation syntaxique de s'étendre sur plusieurs lignes. Notez que +toutes les occurrences successives de \fImotif_début\fP après le +\fImotif_début\fP initial seront colorées jusqu'à la prochaine instance +de \fImotif_fin\fP. + +.SH FICHIERS +.TP +.I $SYSCONFDIR/nanorc +Fichier de configuration général +.TP +.I ~/.nanorc +Fichier de configuration personnel + +.SH VOIR AUSSI +.PD 0 +.TP +\fBnano\fP(1) +.PP +\fI/usr/share/doc/nano/examples/nanorc.sample\fP (ou son équivalent sur +votre système) + +.SH AUTEUR +Chris Allegretta et d'autres (voir les fichiers +\fIAUTHORS\fP et \fITHANKS\fP pour plus d'information). Cette page de +manuel a été rédigée par Jordi Mallach . + +.SH TRADUCTION +Jean-Philippe Guérard , 2003. diff --git a/doc/man/nano.1 b/doc/man/nano.1 new file mode 100644 index 00000000..6dac87b5 --- /dev/null +++ b/doc/man/nano.1 @@ -0,0 +1,204 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" nano.1 is copyright (C) 1999, 2000, 2001, 2002, 2003 by +.\" Chris Allegretta +.\" +.\" This is free documentation, see the latest version of the GNU General +.\" Public License for copying conditions. There is NO warranty. +.\" +.\" $Id$ +.TH NANO 1 "August 24, 2003" +.\" Please adjust this date whenever revising the manpage. +.\" + +.SH NAME +nano \- Nano's ANOther editor, an enhanced free Pico clone + +.SH SYNOPSIS +.B nano +.I [\+LINE]\ [options]\ [file] +.br + +.SH DESCRIPTION +This manual page documents briefly the \fBnano\fP command. +.PP +.\" TeX users may be more comfortable with the \fB\fP and +.\" \fI\fP escape sequences to invoke bold face and italics, +.\" respectively. +\fBnano\fP is a small, free and friendly editor which aims to replace +Pico, the default editor included in the non-free Pine package. Rather +than just copying Pico's look and feel, \fBnano\fP also implements some +missing (or disabled by default) features in Pico, such as "search and +replace" and "go to line number". + +.SH OPTIONS +.TP +.B \+\fILINE\fP +Places cursor at \fILINE\fP on startup. +.TP +.B \-B (\-\-backup) +When saving a file, back up the previous version of it to the current +filename suffixed with a ~. +.TP +.B \-D (\-\-dos) +Write file in DOS format. +.TP +.B \-F (\-\-multibuffer) +Enable multiple file buffers, if available. +.TP +.B \-H (\-\-historylog) +Log search and replace strings to +.I ~/.nano_history +so they may be stored for later editing, if nanorc support is +configured. +.TP +.B \-I (\-\-ignorercfiles) +Don't look at +.I SYSCONFDIR/nanorc +or +.IR ~/.nanorc , +if nanorc support is available. +.TP +.B \-M (\-\-mac) +Write file in Mac format. +.TP +.B \-N (\-\-noconvert) +Disable automatic conversion of files from DOS/Mac format. +.TP +.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. +.TP +.B \-R (\-\-regexp) +Enable regular expression matching for search strings, as well as +\\n subexpression replacement for replace strings, if available. +.TP +.B \-S (\-\-smooth) +Enable smooth scrolling. Text will scroll line-by-line, instead of the +usual chunk-by-chunk behavior. +.TP +.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 \fIstr\fP (\-\-syntax=\fIstr\fP) +Specify a specific syntax highlighting from the +.I .nanorc +to use, if available. +.TP +.B \-c (\-\-const) +Constantly show the cursor position. +.TP +.B \-d (\-\-rebinddelete) +Interpret the Delete key differently so that both Backspace and Delete +work properly. You should only need to use this option if Backspace +acts like Delete on your system. +.TP +.B \-h (\-\-help) +Display a summary of command line options. +.TP +.B \-i (\-\-autoindent) +Indent new lines to the previous line's indentation. Useful when editing +source code. +.TP +.B \-k (\-\-cut) +Enable cut from cursor to end of line with ^K. +.TP +.B \-l (\-\-nofollow) +If the file being edited is a symbolic link, replace the link with +a new file, do not follow it. Good for editing files in +.IR /tmp , +perhaps? +.TP +.B \-m (\-\-mouse) +Enable mouse support (if available for your system). +.TP +.B \-o \fIdir\fP (\-\-operatingdir=\fIdir\fP) +Set operating directory. Makes nano set up something similar to a +chroot. +.TP +.B \-p (\-\-preserve) +Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught +by the terminal. +.TP +.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 +\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 \fIprog\fP (\-\-speller=\fIprog\fP) +Enable alternative spell checker command. +.TP +.B \-t (\-\-tempfile) +Always save changed buffer without prompting. Same as Pico -t option. +.TP +.B \-v (\-\-view) +View file (read only) mode. +.TP +.B \-w (\-\-nowrap) +Disable wrapping of long lines. +.TP +.B \-x (\-\-nohelp) +Disable help screen at bottom of editor. +.TP +.B \-z (\-\-suspend) +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: +.IR SYSCONFDIR/nanorc , +then +.IR ~/.nanorc . +Please see +.BR nanorc (5) +and the example file \fBnanorc.sample\fP which should be provided with +\fBnano\fP. + +.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 +SIGTERM or runs out of memory, when it will write the buffer into a file +named +.I nano.save +if the buffer didn't have a name already, or will add a ".save" suffix +to the current filename. If an emergency file with that name already +exists in the current directory, ".save" and a number (e.g. ".save.1") +will be suffixed to the current filename in order to make it unique. In +multibuffer mode, \fBnano\fP will write all the open buffers to the +respective emergency files. + +.SH BUGS +Please send any comments or bug reports to +.BR nano@nano-editor.org . + +The \fBnano\fP mailing list is available from +.BR nano-devel@gnu.org . + +To subscribe, email to +.B nano-devel-request@gnu.org +with a subject of "subscribe". + +.SH HOMEPAGE +http://www.nano-editor.org/ + +.SH SEE ALSO +.PD 0 +.TP +\fBnanorc\fP(5) +.PP +\fI/usr/share/doc/nano/\fP (or equivalent on your system) + +.SH AUTHOR +Chris Allegretta , et al (see +.I AUTHORS +and +.I THANKS +for details). This manual page was originally written by Jordi Mallach +, for the Debian GNU system (but may be used by +others). diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5 new file mode 100644 index 00000000..d50a2dfb --- /dev/null +++ b/doc/man/nanorc.5 @@ -0,0 +1,170 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" nanorc.5 is Copyright (C) 2003 Free Software Foundation, Inc. +.\" +.\" This is free documentation, see the latest version of the GNU General +.\" Public License for copying conditions. There is NO warranty. +.\" +.\" $Id$ +.TH NANORC 5 "August 24, 2003" +.\" Please adjust this date whenever revising the manpage. +.\" +.SH NAME +nanorc \- GNU nano's rcfile +.SH DESCRIPTION +This manual page documents GNU \fBnano\fP's rcfile. +.PP +\fBnano\fP is a small, free and friendly editor which aims to replace +Pico, the default editor included in the non-free Pine package. Rather +than just copying Pico's look and feel, \fBnano\fP also implements some +missing (or disabled by default) features in Pico, such as "search and +replace" and "go to line number". +.PP +The \fInanorc\fP file contains the default settings for \fBnano\fP. +During startup, \fBnano\fP will first read its system-wide settings from +.IR SYSCONFDIR/nanorc , +and then user-specific settings from +.IR ~/.nanorc . + +.SH OPTIONS +The configuration file accepts a series of "set" and "unset" commands, +which can be used to configure nano on startup without using the +command-line options. Additionally, the "syntax" and "color" keywords +are used to define syntax highlighting rules for different text +patterns. GNU nano will read one command per line. + +Options in rcfiles take precedence over nano's defaults, and command +line options override rcfile settings. + +Options are unset by default, except for options that take an argument. + +The supported commands and arguments are: + +.TP 3 +\fBset/unset autoindent\fP +Use auto-indentation. +.TP +\fBset/unset backup\fP +Create backup files in +.IR filename~ . +.TP +\fBset/unset const\fP +Constantly display the cursor position in the status bar. +.TP +\fBset/unset cut\fP +Use cut to end of line with ^K by default. +.TP +\fBset fill \fIn\fP\fP +Wrap lines at column number \fIn\fP. If \fIn\fP is 0 or less, the line +length will be the screen width less \fIn\fP. The default value is -8. +.TP +\fBset/unset historylog\fP +Enable +.I ~/.nano_history +for saving and reading search/replace strings. +.TP +\fBset/unset multibuffer\fP +Allow inserting files into their own buffers. +.TP +\fBset/unset noconvert\fP +Don't convert files from DOS/Mac format. +.TP +\fBset/unset nofollow\fP +Don't follow symlinks when writing files. +.TP +\fBset/unset nohelp\fP +Don't display the help lists at the bottom of the screen. +.TP +\fBset/unset nowrap\fP +Don't wrap text at all. +.TP +\fBset operatingdir "\fIdirectory\fP"\fP +\fBnano\fP will only read and write files inside \fIdirectory\fP and its +subdirectories. Also, the current directory is changed to here, so +files are inserted from this dir. By default the operating directory +feature is turned off. +.TP +\fBset/unset preserve\fP +Preserve the XON and XOFF keys (^Q and ^S). +.TP +\fBset quotestr "\fIstring\fP"\fP +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. The default value is + + set quotestr "^([\ \\t]*[|>:}#])+" + +if you have regexps, otherwise set quotestr ">\ ". Note that '\\t' +above stands for a literal Tab character. +.TP +\fBset/unset rebinddelete\fP +Interpret the Delete key differently so that both Backspace and Delete +work properly. You should only need to use this option if Backspace +acts like Delete on your system. +.TP +\fBset/unset regexp\fP +Do regular expression searches by default. +.TP +\fBset/unset smooth\fP +Use smooth scrolling by default. +.TP +\fBset speller \fIspellprog\fP\fP +Use spelling checker \fIspellprog\fP instead of the built-in one, which +calls \fIspell\fP. +.TP +\fBset/unset suspend\fP +Allow nano to be suspended with ^Z. +.TP +\fBset tabsize \fIn\fP\fP +Use a tab size of \fIn\fP instead of the default (8); must be greater +than 0. +.TP +\fBset/unset tempfile\fP +Save automatically on exit, don't prompt. +.TP +\fBset/unset view\fP +Disallow file modification. +.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 FILES +.TP +.I SYSCONFDIR/nanorc +System-wide configuration file +.TP +.I ~/.nanorc +Per-user configuration file +.SH SEE ALSO +.PD 0 +.TP +\fBnano\fP(1) +.PP +\fI/usr/share/doc/nano/examples/nanorc.sample\fP (or equivalent on your +system) +.SH AUTHOR +Chris Allegretta , et al (see +.I AUTHORS +and +.I THANKS +for details). +This manual page was written by Jordi Mallach . diff --git a/doc/nanorc.sample b/doc/nanorc.sample new file mode 100644 index 00000000..8e80bf71 --- /dev/null +++ b/doc/nanorc.sample @@ -0,0 +1,207 @@ +## Sample initialization file for GNU nano +## 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. +## +## To make sure a value is not enabled, use "unset