Documentation du Dr FRAPPE

Ce wiki regroupe les résultats de mes expériences en informatique accumulés au cours de mes recherches sur le net.

Dans la mesure du possible, j'ai cité mes sources ; il en manque certainement… :-)

Table des matières

Fichier nanorc (page de man)

Nom

nanorc
fichier de paramétrage de GNU nano

Description

nano est un petit éditeur sympathique et libre.

Le fichier nanorc contient les paramètres par défaut de nano. Il ne devrait pas être en format DOS ou Mac.

Lors du démarrage, nano commencera par lire ses paramètres sur /etc/nanorc, puis les paramètres spécifiques à l'utilisateur sur ~/.nanorc.

Options

Le fichier de configuration accepte une série de commandes set et unset, qui configurent nano au démarrage sans utiliser les options de ligne de commande. En outre, les mots-clés syntax, color, et icolor définissent la syntaxe des règles de mise en évidence pour les différents modèles de texte. nano lit une commande par ligne.

Les options du fichier de configuration ont priorité sur les paramètres par défaut de nano, et les options de ligne de commande, sur celles du fichier de configuration. En outre, les options sont désactivées par défaut, sauf celles qui prennent des arguments.

Les guillemets à l'intérieur des paramètres de chaîne n'ont pas à être protégés par des barres obliques inverses. Le dernier guillemet dans la chaîne sera traitée comme sa fin. Par exemple, l'option brackets “”')>]}“ correspondra à , ', ), >, ], et }.

Voici les commandes et arguments pris en charge :

set/unset allow_insecure_backup
Lors de la sauvegarde de fichiers, permet à la sauvegarde de réussir même si ses autorisations ne peuvent pas être (re)définies pour des considérations spéciales de l'OS. Vous ne devez pas activer cette option sauf si vous êtes sûr d'en avoir besoin.

</WRAP>

set/unset autoindent
Utiliser l'auto-indentation.

; set/unset backup

Créer des fichiers de sauvegarde dans filename~.

; set backupdir directory

répertoire où nano met les fichiers de sauvegarde uniques si la sauvegarde est activée.

; set/unset backwards

recherches en arrière par défaut.

; set/unset boldtext

texte en gras au lieu de la vidéo inverse.

; set brackets string

caractères traités comme des crochets fermants lors de la justification des paragraphes. Ils ne peuvent pas contenir de blancs. Seules les ponctuations terminales, éventuellement suivies de crochets fermants, peuvent terminer une phrase. Valeur par défaut : ””')>]}“.

; set/unset casesensitive

Faire des recherches sensibles à la casse par défaut.

; set/unset const

Afficher en permanence la position du curseur dans la barre d'état.

; set/unset cut

coupe jusqu'à la fin de la ligne par défaut.

; set fill n

Replier les lignes à la colonne n. Si n ⇐ 0, la longueur maximale de la ligne sera la largeur de l'écran moins n colonnes. Valeur par défaut : -8

; set/unset historylog

Active ~/.nano_history pour sauver et relire les chaînes de recherche ou de remplacement.

; set matchbrackets string

Crochets ouvrants et fermants pour la recherche avec crochets. Ils ne peuvent pas contenir de blancs. La première série doit venir avant la dernière et les deux doivent être dans le même ordre. Valeur par défaut : ”(<[{)>]}“.

; set/unset morespace

Utilisez la ligne vide en dessous de la barre de titre comme un espace supplémentaire d'édition

; set/unset mouse

Activer le support de la souris, s'il est disponible pour votre système. Lorsqu'elle est activée, les clics de souris peuvent être utilisés pour placer le curseur, pour placer un marqueur (avec un double-clic), et exécuter des raccourcis. La souris fonctionne dans le système X Window, et sur la console avec gpm.

; set/unset multibuffer

Autoriser l'insertion de fichiers dans leurs propres tampons.

; set/unset noconvert

Ne pas convertir les fichiers au format DOS / Mac.

; set/unset nofollow

Ne pas suivre les liens symboliques lors de l'écriture des fichiers.

; set/unset nohelp

Ne pas afficher l'aide au bas de l'écran.

; set/unset nonewlines

Ne pas ajouter de nouvelles lignes à la fin des fichiers.

; set/unset nowrap

Ne pas replier le texte du tout

; set operatingdir directory

nano ne lit et écrit des fichiers que dans el répertoire et ses sous-répertoires. Ici, le répertoire courant est changé, de telle sorte que les fichiers sont lus depuis ce répertoire. Par défaut, cette fonction est désactivée

; set/unset preserve

Préserver les touches XON et XOFF (^+Q and ^+Shift).

; set punct string

caractères traités comme des ponctuations terminales lors de la justification des paragraphes. Ils ne peuvent pas contenir de blancs. Seules les ponctuations terminales, éventuellement suivies de crochets fermants, peuvent terminer une phrase. La valeur par défaut est ”!.?“.

; set/unset quiet

nano ne signalera les erreurs dans le fichier nanorc et demandera une confirmation en appuyant sur Entrer au démarrage. Si cela est utilisé, il doit être placé en haut du fichier pour être pleinement efficace

; set/unset quickblank

Effacement rapide de la ligne d'état. Les messages d'état disparaîtront après une frappe clavier au lieu de 25.

; set quotestr string

La chaîne de citation email, utilisée pour justifier les paragraphes de citation email. C'est une expression régulière étendue si votre système le permet, sinon une chaîne littérale. Valeur par défaut : “^([ \t]*[#:>\|}])+” si vous avez étendu support des expressions régulières, ou ”> “ sinon. Notez que '\t' représente un caractère de tabulation.

; set/unset rebinddelete

Interpréter la touche Suppr différemment de sorte que Backspace et Delete fonctionnent correctement. À n'utiliser que si Backspace agit comme Delete sur votre système.

; set/unset rebindkeypad

Interprète les touches du pavé numérique afin qu'elles fonctionnent correctement.

; set/unset regexp

Faire par défaut les recherches avec des expressions régulières.

; set/unset smarthome

Rend la touche home plus commode. Quand cette touche est pressée n'importe où, sauf au début d'une ligne, le curseur se place au début (vers l'avant ou vers l'arrière). Si le curseur y est déjà, il se placera au vrai début de ligne.

; set/unset smooth

Utilisez le défilement régulier par défaut.

; set/unset softwrap

Activer le retour à la ligne pour faciliter la visualisation de très longues lignes.

; set speller spellprog

Utilisez le correcteur orthographique spellprog au lieu de celui par défaut, qui appelle spell

; set/unset suspend

Permet de suspendre nano.

; set tabsize n

Utilisez une taille de tabulation de n colonnes. n doit être > 0. La valeur par défaut est 8.

; set/unset tabstospaces

Convertir les tabulations clavier en espaces.

; set/unset tempfile

Save automatically on exit, don't prompt.

; set/unset undo

Enable experimental generic-purpose undo code.

; set/unset view

Disallow file modification.

; set/unset softwrap

Enable soft line wrapping for easier viewing of very long lones.

; set whitespace string

Set the two characters used to display the first characters of tabs and spaces. They must be single-column characters.

; set/unset wordbounds

Detect word boundaries more accurately by treating punctuation characters as parts of words.

; syntax str [“fileregex” … ]

Defines a syntax named str which can be activated via the -Y/–syntax command line option, or will be automatically activated if the current filename matches the extended regular expression fileregex. All following color and icolor statements will apply to syntax until a new syntax is defined.
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 fileregex, and applies to files that don't match any other syntax's fileregex.

; color fgcolor,bgcolor regex …

For the currently defined syntax, display all expressions matching the extended regular expression regex with foreground color fgcolor and background color bgcolor, at least one of which must be specified. 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 for the foreground. If your terminal supports transparency, not specifying a bgcolor tells nano to attempt to use a transparent background.

; icolor fgcolor,bgcolor regex …

Same as above, except that the expression matching is case insensitive.

; color fgcolor,bgcolor start=“sr” end=“er”

Display expressions which start with the extended regular expression sr and end with the extended regular expression er with foreground color fgcolor and background color bgcolor, at least one of which must be specified. 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.

; icolor fgcolor,bgcolor start=“sr” end=“er”

Same as above, except that the expression matching is case insensitive.

; include syntaxfile

Read in self-contained color syntaxes from syntaxfile. Note that syntaxfile can only contain syntax, color, and icolor commands.

===== Raccourcis clavier =====

Les raccourcis clavier peuvent être réaffectés par les commandes suivantes :

bind key function menu
Rebinds the key key to a new function named function in the context of menu menu. The format of key should be one of:

; ^

followed by an alpha character or the word “Space”. Example: ^C

; M-

followed by a printable character or the word “Space”. Example: M-C

; F

followed by a numeric value from 1 to 16. Example: F10

Valid function names to be bound include:

help
Invoke the help menu.

; cancel

Cancel the current command.

; exit

Exit from the program.

; writeout

Write the current buffer to disk.

; justify

Justify the current text.

; insert

Insert a file into the current buffer (or into a new buffer when multibuffer is enabled).

; whereis

Search for text in the current buffer.

; searchagain

Repeat the last search command.

; up

Move up in the editor or browser.

; down

Move down in the editor or browser.

; left

Move left in the editor or browser.

; right

Move right in the editor or browser.

; cut

Cut the current line of text and store it.

; uncut

Copy the currently stored text into the current buffer position.

; curpos

Show the current line, column, word positions in the file.

; firstline

Move to the first line of the file.

; lastline

Move to the last line of the file.

; gotoline

Move to a specific line (and column if specified).

; replace

Interactively replace text within the current buffer.

; mark

Begin selecting text for cutting or pasting at the current position.

; copytext

Copy the currently marked text without deleting it.

; indent

Indent the currently marked text (shift to the right).

; unindent

Un-indent the currently marked text (shift to the left).

; nextword

Move the cursor to the beginning of the next word.

; prevword

Move the cursor to the beginning of the previous word.

; home

Move the cursor to the beginning of the current line.

; end

Move the cursor to the end of the current line.

; beginpara

Move the cursor to the beginning of the current paragraph.

; endpara

Move the cursor to the end of the current paragraph.

; findbracket

Move the cursor to the matching bracket (brace, parenthesis, etc.) of the one under the cursor.

; scrollup

Scroll up one line of text from the current position.

; scrolldown

Scroll down one line of text from the current position.

; prevbuf

Switch to editing/viewing the previous buffer when using multibuffer mode.

; nextbuf

Switch to editing/viewing the next buffer when using multibuffer mode.

; verbatim

Insert the next character verbatim into the file.

; tab

Insert a tab at the current cursor location.

; enter

Insert a new line below the current one.

; delete

Delete the character under the cursor.

; fulljustify

Justify the entire current file.

; wordcount

Count the number of words in the current buffer.

; refresh

Refresh the screen.

; undo

Undo the text action peformed (add text, delete text, etc).

; redo

Redo the last undone action (i.e., undo an undo).

; suspend

Suspend the editor (if the suspend function is enabled, see the “suspendenable” entry below).

; casesens

Toggle case sensitivity in searching (search/replace menus only).

; regexp

Toggle whether searching/replacing is based on literal strings or regular expressions.

; prevhistory

Show the previous history entry in the prompt menus (e.g. search).

; nexthistory

Show the next history entry in the prompt menus (e.g. search).

; dontreplace

Switch back to searching instead of replacing.

; gototext

Search for files matching a string in the file browser (reading or writing files).

; dosformat

When writing a file, switch to writing a DOS format (CR/LF).

; macformat

When writing a file, switch to writing a Mac format.

; append

When writing a file, append to the end instead of overwriting.

; prepend

When writing a file, 'prepend' (write at the beginning) instead of overwriting.

; backup

When writing a file, create a backup of the current file.

; firstfile

Move to the first file when using the file browser (reading or writing files).

; lastfile

Move to the last file when using the file browser (reading or writing files).

; nohelp

Toggle showing/hiding the two-line list of key bindings at the bottom of the screen.

; constupdate

Constantly display the current line, column, word positions.

; morespace

Toggle showing/hiding the blank line which 'separates' the 'title' from the file text.

; smoothscroll

Toggle smooth scrolling when moving via the arrow keys.

; whitespacedisplay

Toggle whether whitespace is shown.

; smarthome

Toggle whether the smart home key function is enabled.

; autoindent

Toggle whether new lines will contain the same amount of whitespace as the line above.

; cuttoend

Toggle whether cutting text will cut the whole line or just from the current cursor position to the end of the line.

; nowrap

Toggle whether long lines will be wrapped to the next line.

; suspendenable

Toggle whether the suspend sequence (normally ^Z) will suspend the editor window.

Valid menu sections are:

main
The main editor window where text is entered.

; search

The search menu (AKA whereis).

; replace

The 'search to replace' menu.

; replacewith

The 'replace with' menu, which comes up after 'search to replace'.

; gotoline

The 'goto line (and column)' menu.

; writeout

The 'write file' menu.

; insert

The 'insert file' menu.

; extcmd

The menu for inserting output from an external comman, reached from the insert menu.

; help

The help menu.

; spell

The interactive spell checker Yes/no menu.

; browser

The file browser for inserting or writing a file.

; whereisfile

The 'search for a file' menu in the file browser.

; gotodir

The 'go to directory' menu.

; all

A special name meaning: apply to all menus where this function exists.

; unbind key menu

Unbind the key key from the menu named menu or from all menus by using all. Same key syntax as for binding. Rebinds the key key to a new function named function in the context of menu menu. The format of key should be one of:

===== Fichiers =====

SYSCONFDIR/nanorc
System-wide configuration file

; ~/.nanorc

Per-user configuration file