sample.nanorc.in (11836B)
1 ## Sample initialization file for GNU nano. 2 ## 3 ## For the options that take parameters, the default value is shown. 4 ## Other options are unset by default. To make sure that an option 5 ## is disabled, you can use "unset <option>". 6 ## 7 ## Characters that are special in a shell should not be escaped here. 8 ## Inside string parameters, quotes should not be escaped -- the last 9 ## double quote on the line will be seen as the closing quote. 10 11 ## If you want ^F, ^B, M-F and M-B to do what they did before version 8.0: 12 # bind ^F forward main 13 # bind ^B back main 14 # bind M-F formatter main 15 # bind M-B linter main 16 17 ## Make 'nextword' (Ctrl+Right) and 'chopwordright' (Ctrl+Delete) 18 ## stop at word ends instead of at beginnings. 19 # set afterends 20 21 ## When soft line wrapping is enabled, make it wrap lines at blanks 22 ## (tabs and spaces) instead of always at the edge of the screen. 23 # set atblanks 24 25 ## Automatically indent a newly created line to the same number of 26 ## tabs and/or spaces as the preceding line -- or as the next line 27 ## if the preceding line is the beginning of a paragraph. 28 # set autoindent 29 30 ## Back up files to the current filename plus a tilde. 31 # set backup 32 33 ## The directory to put unique backup files in. 34 # set backupdir "" 35 36 ## Use bold text instead of reverse video text. 37 # set boldtext 38 39 ## Treat any line with leading whitespace as the beginning of a paragraph. 40 # set bookstyle 41 42 ## The characters treated as closing brackets when justifying paragraphs. 43 ## This may not include any blank characters. Only closing punctuation, 44 ## optionally followed by these closing brackets, can end sentences. 45 # set brackets ""')>]}" 46 47 ## Automatically hard-wrap the current line when it becomes overlong. 48 # set breaklonglines 49 50 ## Do case-sensitive searches by default. 51 # set casesensitive 52 53 ## Interpret digits given on the command line after a colon after a filename 54 ## as the line number to go to in that file. 55 # set colonparsing 56 57 ## Constantly report the cursor position, in the status bar or minibar. 58 # set constantshow 59 60 ## Use cut-from-cursor-to-end-of-line by default. 61 # set cutfromcursor 62 63 ## Do not use the line below the title bar, leaving it entirely blank. 64 # set emptyline 65 66 ## Set the target width for automatic hard-wrapping and for justifying 67 ## paragraphs. If the specified value is 0 or less, the wrapping point 68 ## will be the terminal's width minus this number. 69 # set fill -8 70 71 ## Draw a vertical stripe at the given column, to help judge text width. 72 ## (This option does not have a default value.) 73 # set guidestripe 75 74 75 ## Remember the used search/replace strings for the next session. 76 # set historylog 77 78 ## Display a "scrollbar" on the righthand side of the edit window. 79 # set indicator 80 81 ## Scroll the buffer contents per half-screen instead of per line. 82 # set jumpyscrolling 83 84 ## Display line numbers to the left (and any anchors in the margin). 85 # set linenumbers 86 87 ## Enable vim-style lock-files. This is just to let a vim user know you 88 ## are editing a file [s]he is trying to edit and vice versa. There are 89 ## no plans to implement vim-style undo state in these files. 90 # set locking 91 92 ## Fall back to slow libmagic to try and determine an applicable syntax. 93 # set magic 94 95 ## The opening and closing brackets that are found by a matching-bracket 96 ## search. This may not contain blank characters. The opening brackets 97 ## must come before the closing ones, and they must be in the same order. 98 # set matchbrackets "(<[{)>]}" 99 100 ## Suppress the title bar and show the filename plus a cursor-position 101 ## percentage in the space of the status bar. 102 # set minibar 103 104 ## Enable mouse support, if available for your system. When enabled, 105 ## mouse clicks can be used to place the cursor, set the mark (with 106 ## two clicks), and execute shortcuts. The mouse will work in the 107 ## X Window System, and on the console when gpm is running. 108 # set mouse 109 110 ## Switch on multiple file buffers (inserting a file will put it into 111 ## a separate buffer). 112 # set multibuffer 113 114 ## Don't convert files from DOS/Mac format. 115 # set noconvert 116 117 ## Don't display the helpful shortcut lists at the bottom of the screen. 118 # set nohelp 119 120 ## Don't automatically add a newline when a file does not end with one. 121 # set nonewlines 122 123 ## Set operating directory. nano will not read or write files outside 124 ## this directory and its subdirectories. Also, the current directory 125 ## is changed to here, so any files are inserted from this dir. A blank 126 ## string means the operating-directory feature is turned off. 127 # set operatingdir "" 128 129 ## Remember the position of cursor and anchors for the next editing session. 130 # set positionlog 131 132 ## Preserve the XON and XOFF keys (^Q and ^S). 133 # set preserve 134 135 ## The characters treated as closing punctuation when justifying paragraphs. 136 ## This may not contain blank characters. Only these terminating characters, 137 ## optionally followed by closing brackets, can end sentences. 138 # set punct "!.?" 139 140 ## Make status-bar messages disappear after 1 keystroke instead of after 20. 141 # set quickblank 142 143 ## The regular expression that matches quoting characters in email 144 ## or line-comment introducers in source code. The default is: 145 # set quotestr "^([ ]*([!#%:;>|}]|//))+" 146 147 ## Try to work around a mismatching terminfo terminal description. 148 # set rawsequences 149 150 ## Fix Backspace/Delete confusion problem. 151 # set rebinddelete 152 153 ## Do regular-expression searches by default. 154 ## Regular expressions are of the extended type (ERE). 155 # set regexp 156 157 ## Save a changed buffer automatically on exit; don't prompt. 158 # set saveonexit 159 160 ## Put the cursor on the highlighted item in the file browser, and 161 ## show the cursor in the help viewer; useful for people who use a 162 ## braille display and people with poor vision. 163 # set showcursor 164 165 ## Make the Home key smarter: when Home is pressed anywhere but at the 166 ## very beginning of non-whitespace characters on a line, the cursor 167 ## will jump to that beginning (either forwards or backwards). If the 168 ## cursor is already at that position, it will jump to the true start 169 ## of the line (the left edge). 170 # set smarthome 171 172 ## Spread overlong lines over multiple screen lines. 173 # set softwrap 174 175 ## Use this spelling checker instead of the internal one. This option 176 ## does not have a default value. 177 # set speller "aspell -x -c" 178 179 ## Use the end of the title bar for some state flags: I = auto-indenting, 180 ## M = mark, L = hard-wrapping long lines, R = recording, S = soft-wrapping. 181 # set stateflags 182 183 ## Use this tab size instead of the default; it must be greater than 0. 184 # set tabsize 8 185 186 ## Convert each typed tab to the fitting number of spaces. 187 # set tabstospaces 188 189 ## Snip whitespace at the end of lines when justifying or hard-wrapping. 190 # set trimblanks 191 192 ## Save files by default in Unix format (also when they were DOS or Mac). 193 # set unix 194 195 ## The two single-column characters used to display the first characters 196 ## of tabs and spaces. 187 in ISO 8859-1 (0000BB in Unicode) and 183 in 197 ## ISO-8859-1 (0000B7 in Unicode) seem to be good values for these. 198 ## The default when in a UTF-8 locale: 199 # set whitespace "»·" 200 ## The default otherwise: 201 # set whitespace ">." 202 203 ## Detect word boundaries differently by treating punctuation 204 ## characters as parts of words. 205 # set wordbounds 206 207 ## The characters (besides alphanumeric ones) that should be considered 208 ## as parts of words. This option does not have a default value. When 209 ## set, it overrides option 'set wordbounds'. 210 # set wordchars "<_>." 211 212 ## Let an unmodified Backspace or Delete erase the marked region (instead 213 ## of a single character, and without affecting the cutbuffer). 214 # set zap 215 216 ## Hide the bars plus help lines and use the whole terminal as edit area. 217 # set zero 218 219 220 ## Paint the interface elements of nano. These are examples; there are 221 ## no colors by default, except for errorcolor and spotlightcolor. 222 # set titlecolor bold,white,blue 223 # set promptcolor lightwhite,grey 224 # set statuscolor bold,white,green 225 # set errorcolor bold,white,red 226 # set spotlightcolor black,lightyellow 227 # set selectedcolor lightwhite,#804 228 # set stripecolor ,#444 229 # set scrollercolor slate,#222 230 # set numbercolor cyan 231 # set keycolor cyan 232 # set functioncolor green 233 234 ## In root's .nanorc you might want to use: 235 # set titlecolor bold,white,magenta 236 # set promptcolor black,yellow 237 # set statuscolor bold,white,magenta 238 # set errorcolor bold,white,red 239 # set spotlightcolor black,orange 240 # set selectedcolor lightwhite,cyan 241 # set stripecolor ,yellow 242 # set scrollercolor magenta 243 # set numbercolor magenta 244 # set keycolor lightmagenta 245 # set functioncolor magenta 246 247 248 ## === Syntax coloring === 249 ## For all details, see 'man nanorc', section SYNTAX HIGHLIGHTING. 250 251 ## To include most of the existing syntax definitions, you can do: 252 # include @PKGDATADIR@/*.nanorc 253 254 ## Or you can select just the ones you need. For example: 255 # include @PKGDATADIR@/html.nanorc 256 # include @PKGDATADIR@/python.nanorc 257 # include @PKGDATADIR@/sh.nanorc 258 259 ## In @PKGDATADIR@/extra/ you can find some syntaxes that are 260 ## specific for certain distros or for some less common languages. 261 262 263 ## If <Tab> should always produce four spaces when editing a Python file, 264 ## independent of the settings of 'tabsize' and 'tabstospaces': 265 # extendsyntax python tabgives " " 266 267 268 ## === Key bindings === 269 ## For all details, see 'man nanorc', section REBINDING KEYS. 270 271 ## If you want to suspend nano with one keystroke (instead of with ^T^Z): 272 # bind ^Z suspend main 273 274 ## The <Ctrl+Delete> keystroke deletes the word to the right of the cursor. 275 ## On some terminals the <Ctrl+Backspace> keystroke produces ^H, which is 276 ## the ASCII character for backspace, so it is bound by default to the 277 ## backspace function. The <Backspace> key itself produces a different 278 ## keycode, which is hard-bound to the backspace function. So, if you 279 ## normally use <Backspace> for backspacing and not ^H, you can make 280 ## <Ctrl+Backspace> delete the word to the left of the cursor with: 281 # bind ^H chopwordleft main 282 283 ## For a more mnemonic Comment keystroke (overriding Cut-from-cursor): 284 # bind M-K comment main 285 286 ## If you want ^L to just refresh the screen and not center the cursor: 287 # bind ^L refresh main 288 289 ## When you sometimes type M-J instead of M-K, or M-T instead of M-R: 290 # unbind M-J main 291 # unbind M-T main 292 ## (Those functions are still accessible through ^T^J and ^T^V.) 293 294 ## For quickly uppercasing or lowercasing the word that the cursor is on. 295 ## (These effectively select a word and pipe it through a sed command.) 296 # bind Sh-M-U "{nextword}{mark}{prevword}{execute}| sed 's/.*/\U&/' {enter}" main 297 # bind Sh-M-L "{nextword}{mark}{prevword}{execute}| sed 's/.*/\L&/' {enter}" main 298 299 ## For copying a marked region to the system clipboard: 300 # bind Sh-M-C "{execute}| xsel -ib {enter}{undo}" main 301 302 ## For normalizing Unicode to precomposed characters: 303 # bind Sh-M-N "{execute}| uconv -x nfc {enter}" main 304 305 ## For wiping all anchors in a buffer: 306 # bind Sh-M-W "{execute}| cat {enter}" main 307 308 ## For snipping trailing blanks when you save a file: 309 # bind ^S "{execute}| sed 's/\s\+$//' {enter}{savefile}" main 310 311 ## If you would like nano to have keybindings that are more "usual", 312 ## such as ^O for Open, ^F for Find, ^H for Help, and ^Q for Quit, 313 ## then uncomment these: 314 # bind ^X cut main 315 # bind ^C copy main 316 # bind ^V paste all 317 # bind ^Q exit all 318 # bind ^S savefile main 319 # bind ^W writeout main 320 # bind ^O insert main 321 # set multibuffer 322 # bind ^H help all 323 # bind ^H exit help 324 # bind ^F whereis all 325 # bind ^G findnext all 326 # bind ^B wherewas all 327 # bind ^D findprevious all 328 # bind ^R replace main 329 # unbind ^U all 330 # unbind ^N main 331 # unbind ^Y all 332 # unbind M-J main 333 # unbind M-T main 334 # bind ^A mark main 335 # bind ^P location main 336 # bind ^T gotoline main 337 # bind ^T gotodir browser 338 # bind ^T cutrestoffile execute 339 # bind ^L linter execute 340 # bind ^E execute main 341 # bind ^K "{mark}{end}{zap}" main 342 # bind ^U "{mark}{home}{zap}" main 343 # bind ^Z undo main 344 # bind ^Y redo main