From 12742586e583d1d6421ab2f7192c5753866076cc Mon Sep 17 00:00:00 2001
From: Benno Schulenberg The nano source tarballs can be downloaded from the following web sites: 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. This will put nano into /usr/bin when you run make install. Actually, it does, but you have to use make install-strip. The default make install does not, and will not, run strip automatically. It does when you use make install-strip. The default make install does not, and will not, run strip automatically. 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: 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 with Control-^ to select text). 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 whether 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. There's also the --enable-tiny option which disables everything above, as well as some larger chunks of the program (like the undo/redo code and the code for selecting text). Also, if you know you don't need other languages, you can use --disable-nls to disable internationalization and save a few kilobytes. And finally, there's always good old strip to remove all unneeded symbols. To use multiple file buffers, you must not have configured nano with --disable-multibuffer nor with --enable-tiny (use nano -V to check the compilation options). Then when you want to insert a file into its own buffer instead of into the current file, just hit Meta-F after typing ^R. If you always want files to be loaded into their own buffers, use the -F or --multibuffer flag when you invoke nano, or add set multibuffer to your .nanorc file. When you want to insert a literal character into the file you're editing, such as a control character that nano usually treats as a command, first press Meta-V (if you're not at a prompt, you'll get the message "Verbatim Input" on the status bar), then press the key(s) that generate the character you want. Alternatively, if Unicode support is enabled (see section 5.3), you can press Meta-V and then type a six-digit hexadecimal code (from 000000 to 10FFFF, case-insensitive), and the character with the corresponding value will be inserted. The status bar will change to "Unicode Input: ......" when you do this. It's not hard at all! But, your nano must not have been compiled with --disable-nanorc. Then simply copy the sample.nanorc 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 of the file is simple. Flags are turned on and off by using the words set and unset plus the long option name for the feature. For example, "set nowrap" or "set smarthome". It's not hard at all! Simply copy the sample.nanorc from the doc/ directory in the nano source package (or from /usr/doc/nano on your system) to .nanorc in your home directory, and then edit it. If you didn't get a sample nanorc, the syntax of the file is simple: features are turned on and off by using the words set and unset followed by the long option name of the feature (see man nanorc for the full list of options). For example, "set quickblank" or "set smarthome". Of course, for this to work, your nano must not have been compiled with --disable-nanorc. By default (see 3.3), nano gets installed into /usr/local. This also means that at startup nano will read /usr/local/etc/nanorc instead of /etc/nanorc. You can make a symlink from the former to the latter if you want your self-compiled nano to read the same nanorc as the system-installed nano. Or you can configure your nano to overwrite the system nano (again, see 3.3). By default (see 3.3), nano gets installed into /usr/local. This also means that, at startup, nano will read /usr/local/etc/nanorc instead of /etc/nanorc. You can make a symlink from the former to the latter if you want your self-compiled nano to read the same nanorc as the system-installed nano. Or you can configure your nano to overwrite the system nano (again, see 3.3). If a command-line option that begins with '+' is followed by another option, the former is always treated as a starting line and column number, and the latter is always treated as a filename. If a command-line option that begins with '+' isn't followed by another option, it's always treated as a filename. Examples: To open '+filename.txt' starting on line 1: nano +filename.txt If a command-line argument that begins with '+' is followed by another argument, the former is always treated as a starting line (plus column number), and the latter always as a filename. If a command-line argument that begins with '+' isn't followed by another argument, it's treated as a filename. Examples: To open '+filename.txt': nano +filename.txt2.1. Web sites that carry nano.
2.2. RPM packages (RedHat, OpenSuse, and derivatives).
@@ -137,9 +137,9 @@
3.3. Why does everything go into /usr/local?
+ 3.4. nano should automatically run strip on the binary when installing it!
-
+3.5. How can I make the executable smaller? This is too bloated!
@@ -160,7 +160,7 @@
--disable-tabcomp Disable the tab-completion functions
--disable-wordcomp Disable the word-completion function
--disable-wrapping Disable all hard-wrapping of text
- 3.6. Tell me more about this multibuffer stuff!
3.8. How do I make a .nanorc file that will be read when I start nano?
-
+3.9. Why does my self-compiled nano not read /etc/nanorc?
-
+
4. Running
4.1. How do I open a file with a name beginning with '+' from the command line?
-
+
+ To open '+filename.txt' starting on line 1 and 'filename.txt' starting on line 40: nano +1 +filename.txt +40 filename.txt
To open '+filename.txt' starting on line 10: nano +10 +filename.txt
To open '+filename.txt' starting on line 1, column 20: nano +,20 +filename.txt
To open '+filename.txt' starting on line 10, column 20: nano +10,20 +filename.txt
- To open '+filename.txt' starting on line 1 and 'filename.txt' starting on line 40 (if nano has been compiled with multibuffer support): nano +1 +filename.txt +40 filename.txt
Try setting your $TERM variable to 'vt100'. nano doesn't yet support every term entry under the sun.
Bourne shell users (bash and sh): export TERM=vt100