Chris Allegretta | 7e7bcf8 | 2001-02-12 03:48:53 +0000 | [diff] [blame] | 1 | This is nano.info, produced by makeinfo version 4.0 from nano.texi. |
| 2 | |
| 3 | |
| 4 | File: nano.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir) |
| 5 | |
Chris Allegretta | 35ac99d | 2001-02-15 00:25:17 +0000 | [diff] [blame] | 6 | This manual documents GNU nano, a small and friendly text editor. |
Chris Allegretta | 7e7bcf8 | 2001-02-12 03:48:53 +0000 | [diff] [blame] | 7 | |
| 8 | * Menu: |
| 9 | |
| 10 | * Introduction:: |
| 11 | * Editor Basics:: |
| 12 | * Online Help:: |
| 13 | * Feature Toggles:: |
| 14 | * The File Browser:: |
| 15 | * Pico Compatibility:: |
| 16 | * Building and Configure Options:: |
| 17 | |
| 18 | |
| 19 | File: nano.info, Node: Introduction, Next: Editor Basics, Prev: Top, Up: Top |
| 20 | |
| 21 | Introduction |
| 22 | ************ |
| 23 | |
Chris Allegretta | 35ac99d | 2001-02-15 00:25:17 +0000 | [diff] [blame] | 24 | GNU `nano' is a small and friendly text editor. Besides basic text |
Chris Allegretta | 7e7bcf8 | 2001-02-12 03:48:53 +0000 | [diff] [blame] | 25 | editing, `nano' offers many extra features like an interactive search |
| 26 | and replace, goto line number, auto-indentation, feature toggles, |
| 27 | internationalization support, and filename tab completion. |
| 28 | |
| 29 | * Menu: |
| 30 | |
| 31 | * Overview:: |
| 32 | * Command Line Options:: |
| 33 | |
| 34 | |
| 35 | File: nano.info, Node: Overview, Next: Command Line Options, Prev: Introduction, Up: Introduction |
| 36 | |
| 37 | Overview |
| 38 | ======== |
| 39 | |
| 40 | `nano' [GNU long option] [option] +LINE [ FILE ... ] |
| 41 | |
| 42 | The original goal for `nano' was a complete bug-for-bug compatible |
| 43 | emulation of Pico, but consistency is now a slightly higher priority. |
| 44 | There is a flag to implement (nearly) complete Pico emulation, (option |
| 45 | -p or GNU long option -pico). This can also be toggled from within |
| 46 | `nano' by typing Meta-P. *Note Pico Compatibility::, for more info. |
| 47 | |
| 48 | Email bug reports to <nano@nano-editor.org>. |
| 49 | |
| 50 | |
| 51 | File: nano.info, Node: Command Line Options, Prev: Overview, Up: Introduction |
| 52 | |
| 53 | Command Line Options |
| 54 | ==================== |
| 55 | |
| 56 | `nano' takes the following options from the command line: |
| 57 | `-T [num, --tabsize=[num]' |
| 58 | Set the displayed tab length to [num] columns. |
| 59 | |
| 60 | `-R, --regexp' |
| 61 | Turns on regular expression search and search/replace. |
| 62 | |
| 63 | `-V, --version' |
| 64 | Print the version number and copyright and quit. |
| 65 | |
| 66 | `-c, --const' |
| 67 | Constantly display the cursor posititon and line number on the |
| 68 | statusbar. |
| 69 | |
| 70 | `-h, --help' |
| 71 | Print the usage and exit. |
| 72 | |
| 73 | `-i, --autoindent' |
| 74 | Automatically indent new lines to the same number of spaces and |
| 75 | tabs as the previous line. |
| 76 | |
| 77 | `-k, --cut' |
| 78 | Makes ^K cut from the current cursor position to the end of the |
| 79 | current line. |
| 80 | |
| 81 | `-l, --nofollow' |
| 82 | When writing files, if the given file is a symbolic link it is |
| 83 | removed and a new file is created. |
| 84 | |
| 85 | `-m, --mouse' |
| 86 | Enables the use of the mouse to select text (currently only useful |
| 87 | for running under the X window system). |
| 88 | |
| 89 | `-p, --pico' |
| 90 | Emulate Pico as closely as possible, sacrificing consistency for |
| 91 | correct emulation. *Note Pico Compatibility::, for more info. |
| 92 | |
| 93 | `-r [#cols], --fill=[#cols].' |
| 94 | Wrap lines at column #cols. By default this is the width of the |
| 95 | screen, less eight. |
| 96 | |
| 97 | `-s [prog], --speller=[prog]' |
| 98 | Invoke [prog] as the spell checker. By default, `nano' uses its |
| 99 | own interactive spell checker that requires the `spell' program be |
| 100 | installed on your system. |
| 101 | |
| 102 | `-t, --tempfile' |
| 103 | Do not ask whether or not to save the current contents of the file |
| 104 | when exiting, assume yes. This is most useful when using `nano' |
| 105 | as the composer of a mailer program. |
| 106 | |
| 107 | `-x, --nohelp' |
| 108 | In Expert Mode, the Shortcut Lists will not appear at the bottom |
| 109 | of the screen. This affects the location of the statusbar as |
| 110 | well, as in Expert Mode it is located at the very bottom of the |
| 111 | editor. |
| 112 | |
| 113 | Note: When accesing the help system, Expert Mode is temporarily |
| 114 | disabled to display the help system navigation keys. |
| 115 | |
| 116 | `-v, --view' |
| 117 | Do not allow the contents of the file to be altered. Note that |
| 118 | this flag should NOT be used in place of correct file permissions |
| 119 | to implement a read-only file. |
| 120 | |
| 121 | `-w, --nowrap' |
| 122 | Do not wrap long lines at any length. This option overrides any |
| 123 | value for -r. |
| 124 | |
| 125 | `-z, --suspend' |
| 126 | Enable suspend ability of `nano' using the system's suspend |
| 127 | keystroke (usually ^Z). |
| 128 | |
| 129 | `+LINE' |
| 130 | Start at line number LINE instead of the default of line 1. |
| 131 | |
| 132 | |
| 133 | File: nano.info, Node: Editor Basics, Next: Online Help, Prev: Introduction, Up: Top |
| 134 | |
| 135 | Editor Basics |
| 136 | ************* |
| 137 | |
| 138 | * Menu: |
| 139 | |
| 140 | * Entering Text:: |
| 141 | * Special Functions:: |
| 142 | * The Titlebar:: |
| 143 | * The Statusbar:: |
| 144 | * Shortcut Lists:: |
| 145 | |
| 146 | |
| 147 | File: nano.info, Node: Entering Text, Next: Special Functions, Prev: Editor Basics, Up: Editor Basics |
| 148 | |
| 149 | Entering Text |
| 150 | ============= |
| 151 | |
| 152 | All key sequences in `nano' are entered using the keyboard. `nano' |
| 153 | is a "modeless" editor, all keys with the exception of Control and Meta |
| 154 | key sequences will enter text into the file being edited. |
| 155 | |
| 156 | |
| 157 | File: nano.info, Node: Special Functions, Next: The Titlebar, Prev: Entering Text, Up: Editor Basics |
| 158 | |
| 159 | Special Functions |
| 160 | ================= |
| 161 | |
| 162 | Special functions use the Control key (displayed in the help and |
| 163 | shotcut lists as ^) or the Meta key (displayed as M). |
| 164 | |
| 165 | * Control key sequences are entered by holding down the Control key |
| 166 | and pressing the desired letter. |
| 167 | |
| 168 | * Meta key sequences can be entered in a number of possible ways: |
| 169 | Pressing the Escape key, then releasing it and pressing the |
| 170 | desired key, or holding down the Alt key while pressing the desired |
| 171 | key. This varies from keyboard to keyboard, and certain commercial |
| 172 | operating systems "swallow" the Alt key so that it never reaches |
| 173 | the application. If your operating system does this, you should |
| 174 | use the Escape key to generate Meta key sequences. |
| 175 | |
| 176 | |
| 177 | File: nano.info, Node: The Titlebar, Next: The Statusbar, Prev: Special Functions, Up: Editor Basics |
| 178 | |
| 179 | The Titlebar |
| 180 | ============ |
| 181 | |
| 182 | The titlebar is the line displayed at the top of the editor. There |
| 183 | are three sections: left, center and right. The section on the left |
| 184 | displays the version of `nano' being used. The center section displays |
| 185 | the current file name, or "New Buffer" if the file has not yet been |
| 186 | named. The section on the right will display "Modified" if the file |
| 187 | has been modified since it ws last saved or opened. |
| 188 | |
| 189 | Special modes: When nano is in "File browser" mode, the center |
| 190 | section will display the current directory instead of the filename. |
| 191 | *Note The File Browser::. |
| 192 | |
| 193 | |
| 194 | File: nano.info, Node: The Statusbar, Next: Shortcut Lists, Prev: The Titlebar, Up: Editor Basics |
| 195 | |
| 196 | The Statusbar |
| 197 | ============= |
| 198 | |
| 199 | The statusbar is located three lines from the bottom of the screen |
| 200 | (or the bottom line in Expert Mode. *Note Expert Mode::, for more info. |
| 201 | |
| 202 | The Statusbar shows important and informational messages. Any error |
| 203 | messages that occur from using the editor will appear on the statusbar. |
| 204 | Any questions that are asked of the user will be asked on the statusbar, |
| 205 | and any user input (serch strings, file names, etc) will be input on the |
| 206 | statusbar. |
| 207 | |
| 208 | |
| 209 | File: nano.info, Node: Shortcut Lists, Prev: The Statusbar, Up: Editor Basics |
| 210 | |
| 211 | Shortcut Lists |
| 212 | ============== |
| 213 | |
| 214 | The Shorcut Lists are the two lines at the bottom of the screen |
| 215 | which show some of the more commonly used functions in the editor. The |
| 216 | exact functions which are displayed depend on whether Pico |
| 217 | Compatibility Mode mode is enabled. *Note Pico Compatibility::, for |
| 218 | more info. |
| 219 | |
| 220 | |
| 221 | File: nano.info, Node: Online Help, Next: Feature Toggles, Prev: Editor Basics, Up: Top |
| 222 | |
| 223 | Online Help |
| 224 | *********** |
| 225 | |
| 226 | The online help system in `nano' is available by pressing ^G. It is |
| 227 | fairly self explanatory, documenting the various parts of the editor |
| 228 | and available keystrokes. Navigation is via the ^Y (Page Up) and ^V |
| 229 | (Page Down) keys. ^X exits the help system. |
| 230 | |
| 231 | |
| 232 | File: nano.info, Node: Feature Toggles, Next: The File Browser, Prev: Online Help, Up: Top |
| 233 | |
| 234 | Feature Toggles |
| 235 | *************** |
| 236 | |
| 237 | Toggles allow you to change certain aspects of the editor that would |
| 238 | normally be done via command line flags. They are invoked via certain |
| 239 | Meta key sequenced. *Note Special Functions::, for more info. The |
| 240 | following toggles are available: |
| 241 | |
| 242 | `Constant Update Toggle (Meta-C)' |
| 243 | toggles the -c (-const) command line flag. |
| 244 | |
| 245 | `Regular Expressions Toggle (Meta-E)' |
| 246 | toggles the -R (-regexp) command line flag. |
| 247 | |
| 248 | `AutoIndent Toggle (Meta-I)' |
| 249 | toggles the -i (-autoindent) command line flag. |
| 250 | |
| 251 | `Cut To End Toggle (Meta-K)' |
| 252 | toggles the -k (-cut) command line flag. |
| 253 | |
| 254 | `Cut To End Toggle (Meta-M)' |
| 255 | toggles the -m (-mouse) command line flag. |
| 256 | |
| 257 | `Pico Mode Toggle (Meta-P)' |
| 258 | toggles the -p (-pico) command line flag. *Note Pico |
| 259 | Compatibility::, for more info. |
| 260 | |
| 261 | `AutoWrap Toggle (Meta-W)' |
| 262 | toggles the -w (-nowrap) command line flag. |
| 263 | |
| 264 | `Expert/Nohelp Toggle (Meta-X)' |
| 265 | toggles the -x (-nohelp) command line flag. |
| 266 | |
| 267 | `Suspend Toggle (Meta-Z)' |
| 268 | toggles the -i (-autoindent) command line flag. |
| 269 | |
| 270 | |
| 271 | File: nano.info, Node: The File Browser, Next: Pico Compatibility, Prev: Feature Toggles, Up: Top |
| 272 | |
| 273 | The File Browser |
| 274 | **************** |
| 275 | |
| 276 | When reading or writilg files, pressing ^T will invoke the file |
| 277 | browser. Here, one can navigate directories in a graphical manner in |
| 278 | order to find the desired file. |
| 279 | |
| 280 | Basic movement in the file browser is accomplished with he arrow keys |
| 281 | and page up/down. The behavior of the enter (or 's') key varies by what |
| 282 | is currently selected. If the currently selected object is a directory, |
| 283 | the file browser will enter and display the contects of the directory. |
| 284 | If the object is a file, this filename and path are copied to the |
| 285 | statusbar and the file browser is exited. |
| 286 | |
| 287 | |
| 288 | File: nano.info, Node: Pico Compatibility, Next: Building and Configure Options, Prev: The File Browser, Up: Top |
| 289 | |
| 290 | Pico Compatibility |
| 291 | ****************** |
| 292 | |
| 293 | Nano does not completely emulate Pico by default. The following |
| 294 | differences apply to the default mode and Pico Compatibility mode: |
| 295 | |
| 296 | `Displayed Shortcuts' |
Chris Allegretta | 882e145 | 2001-02-12 06:52:50 +0000 | [diff] [blame] | 297 | By default, the following shortcuts are displayed in the Shortcut |
| 298 | Lists: |
Chris Allegretta | 7e7bcf8 | 2001-02-12 03:48:53 +0000 | [diff] [blame] | 299 | |
| 300 | ^G ^O ^\ ^Y ^K ^C |
| 301 | ^X ^R ^W ^V ^U ^T |
| 302 | |
| 303 | Related functions are listed above or below each other by default. |
Chris Allegretta | fb9cffe | 2001-02-12 06:42:43 +0000 | [diff] [blame] | 304 | The Justify function is not listed, instead the "Replace" |
Chris Allegretta | 882e145 | 2001-02-12 06:52:50 +0000 | [diff] [blame] | 305 | function is displayed. Also, he "Read File" and "WriteOut" |
| 306 | functions are aligned for consistency. |
Chris Allegretta | 7e7bcf8 | 2001-02-12 03:48:53 +0000 | [diff] [blame] | 307 | |
| 308 | In Pico Compatibility mode, the default Pico shortcuts are |
| 309 | displayed: |
| 310 | |
| 311 | ^G ^O ^R ^Y ^K ^C |
| 312 | ^X ^J ^W ^V ^U ^T |
| 313 | |
| 314 | `Previous String Text' |
| 315 | By default, previously entered string for a function (search |
| 316 | string, file name) will be placed on the statusbar, and is |
| 317 | editable. This is done so there is consistency across all |
| 318 | functions. For example: even if there is a previous replace |
Chris Allegretta | 882e145 | 2001-02-12 06:52:50 +0000 | [diff] [blame] | 319 | string, it can always be deleted if one wishes to perform an empty |
| 320 | string replace. |
Chris Allegretta | 7e7bcf8 | 2001-02-12 03:48:53 +0000 | [diff] [blame] | 321 | |
| 322 | In Pico Compatibility Mode, the previously entered text in a |
| 323 | search or replace will appear in brackets, and is not editable. |
| 324 | It is not a simple matter to do an empty string replace when a |
| 325 | previous replace string exists, for example. When writing a file, |
| 326 | the previous filename will be displayed in the editable text |
| 327 | portion of the editor. |
| 328 | |
| 329 | `Interactive Replace and Spell Checker' |
| 330 | It is worth noting that the `nano' replace function is interactive, |
| 331 | i.e. it does not stop after one search string is found and |
| 332 | automatically replace it. The `nano' implementation will stop at |
| 333 | each search string found and query whether to replace this |
| 334 | instance or not. The internal spell checker operates similarly. |
Chris Allegretta | 882e145 | 2001-02-12 06:52:50 +0000 | [diff] [blame] | 335 | Note that these is no way to force these functions to behave in |
| 336 | the Pico fashion. |
Chris Allegretta | 7e7bcf8 | 2001-02-12 03:48:53 +0000 | [diff] [blame] | 337 | |
| 338 | |
| 339 | File: nano.info, Node: Building and Configure Options, Prev: Pico Compatibility, Up: Top |
| 340 | |
| 341 | Building and Configure Options |
| 342 | ****************************** |
| 343 | |
| 344 | Building nano from source is fairly straightforward if you are |
| 345 | familiar with compiling programs with autoconf support: |
| 346 | |
| 347 | tar xvfz nano-x.y.z.tar.gz (where x.y.z is the version of nano) cd |
| 348 | nano-x.y.z/ ./configure make make install |
| 349 | |
| 350 | if you are looking to optimize nano for size, you may want to |
| 351 | consider the following command line options: |
| 352 | |
| 353 | `--disable-tabcomp' |
| 354 | Disable the tab completion code when reading or writing files. |
| 355 | |
| 356 | `--disable-justify' |
| 357 | Disable the justify (^J)/unjustify (^U) functions in the editor. |
| 358 | |
| 359 | `--disable-speller' |
| 360 | Disables spell checker abillity. |
| 361 | |
| 362 | `--disable-help' |
| 363 | Disables the help function (^G). Disabling this option maks the |
| 364 | binary much smaller, but makes it difficult for new users to learn |
| 365 | more than very basic things about using the editor. |
| 366 | |
| 367 | `--disable-browser' |
| 368 | Disables the mini file browser (^O) when reading or writing files. |
| 369 | |
| 370 | `--enable-tiny' |
| 371 | This options disables all the above. It also disables some of the |
| 372 | larger internals of the editor, like the marker code (^^) and the |
| 373 | cut to line (-k) option which depends on the it to work properly. |
| 374 | It also disables the function toggles and mouse support. |
| 375 | |
| 376 | |
| 377 | |
| 378 | Tag Table: |
| 379 | Node: Top69 |
Chris Allegretta | 35ac99d | 2001-02-15 00:25:17 +0000 | [diff] [blame] | 380 | Node: Introduction377 |
| 381 | Node: Overview803 |
| 382 | Node: Command Line Options1383 |
| 383 | Ref: Expert Mode3106 |
| 384 | Node: Editor Basics3948 |
| 385 | Node: Entering Text4173 |
| 386 | Node: Special Functions4513 |
| 387 | Node: The Titlebar5367 |
| 388 | Node: The Statusbar6064 |
| 389 | Node: Shortcut Lists6644 |
| 390 | Node: Online Help7036 |
| 391 | Node: Feature Toggles7412 |
| 392 | Node: The File Browser8558 |
| 393 | Node: Pico Compatibility9267 |
| 394 | Node: Building and Configure Options11309 |
Chris Allegretta | 7e7bcf8 | 2001-02-12 03:48:53 +0000 | [diff] [blame] | 395 | |
| 396 | End Tag Table |