.nanorc 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. ## Sample initialization file for GNU nano.
  2. ##
  3. ## Please note that you must have configured nano with --enable-nanorc
  4. ## for this file to be read! Also note that this file should not be in
  5. ## DOS or Mac format, and that characters specially interpreted by the
  6. ## shell should not be escaped here.
  7. ##
  8. ## To make sure a value is disabled, use "unset <option>".
  9. ##
  10. ## For the options that take parameters, the default value is given.
  11. ## Other options are unset by default.
  12. ##
  13. ## Quotes inside string parameters don't have to be escaped with
  14. ## backslashes. The last double quote in the string will be treated as
  15. ## its end. For example, for the "brackets" option, ""')>]}" will match
  16. ## ", ', ), >, ], and }.
  17. ## Use auto-indentation.
  18. set autoindent
  19. ## Backup files to filename~.
  20. # set backup
  21. ## The directory to put unique backup files in.
  22. # set backupdir ""
  23. ## Do backwards searches by default.
  24. # set backwards
  25. ## Use bold text instead of reverse video text.
  26. set boldtext
  27. ## The characters treated as closing brackets when justifying
  28. ## paragraphs. They cannot contain blank characters. Only closing
  29. ## punctuation, optionally followed by closing brackets, can end
  30. ## sentences.
  31. ##
  32. set brackets ""')>]}"
  33. ## Do case sensitive searches by default.
  34. # set casesensitive
  35. ## Constantly display the cursor position in the statusbar. Note that
  36. ## this overrides "quickblank".
  37. set const
  38. ## Use cut to end of line by default.
  39. set cut
  40. ## Set the line length for wrapping text and justifying paragraphs.
  41. ## If fill is 0 or less, the line length will be the screen width less
  42. ## this number.
  43. ##
  44. set fill -8
  45. ## Enable ~/.nano_history for saving and reading search/replace strings.
  46. set historylog
  47. ## The opening and closing brackets that can be found by bracket
  48. ## searches. They cannot contain blank characters. The former set must
  49. ## come before the latter set, and both must be in the same order.
  50. ##
  51. set matchbrackets "(<[{)>]}"
  52. ## Use the blank line below the titlebar as extra editing space.
  53. # set morespace
  54. ## Enable mouse support, if available for your system. When enabled,
  55. ## mouse clicks can be used to place the cursor, set the mark (with a
  56. ## double click), and execute shortcuts. The mouse will work in the X
  57. ## Window System, and on the console when gpm is running.
  58. ##
  59. #set mouse
  60. ## Allow multiple file buffers (inserting a file will put it into a
  61. ## separate buffer). You must have configured with --enable-multibuffer
  62. ## for this to work.
  63. ##
  64. set multibuffer
  65. ## Don't convert files from DOS/Mac format.
  66. # set noconvert
  67. ## Don't follow symlinks when writing files.
  68. # set nofollow
  69. ## Don't display the helpful shortcut lists at the bottom of the screen.
  70. # set nohelp
  71. ## Don't add newlines to the ends of files.
  72. # set nonewlines
  73. ## Don't wrap text at all.
  74. # set nowrap
  75. ## Set operating directory. nano will not read or write files outside
  76. ## this directory and its subdirectories. Also, the current directory
  77. ## is changed to here, so any files are inserted from this dir. A blank
  78. ## string means the operating directory feature is turned off.
  79. ##
  80. # set operatingdir ""
  81. ## Preserve the XON and XOFF keys (^Q and ^S).
  82. # set preserve
  83. ## The characters treated as closing punctuation when justifying
  84. ## paragraphs. They cannot contain blank characters. Only closing
  85. ## punctuation, optionally followed by closing brackets, can end
  86. ## sentences.
  87. ##
  88. # set punct "!.?"
  89. ## Do quick statusbar blanking. Statusbar messages will disappear after
  90. ## 1 keystroke instead of 26. Note that "const" overrides this.
  91. ##
  92. # set quickblank
  93. ## The email-quote string, used to justify email-quoted paragraphs.
  94. ## This is an extended regular expression if your system supports them,
  95. ## otherwise a literal string. Default:
  96. set quotestr "^([ ]*[#:>\|}])+"
  97. ## if you have extended regular expression support, otherwise:
  98. set quotestr "> "
  99. ## Fix Backspace/Delete confusion problem.
  100. # set rebinddelete
  101. ## Fix numeric keypad key confusion problem.
  102. # set rebindkeypad
  103. ## Do extended regular expression searches by default.
  104. # set regexp
  105. ## Make the Home key smarter. When Home is pressed anywhere but at the
  106. ## very beginning of non-whitespace characters on a line, the cursor
  107. ## will jump to that beginning (either forwards or backwards). If the
  108. ## cursor is already at that position, it will jump to the true
  109. ## beginning of the line.
  110. # set smarthome
  111. ## Use smooth scrolling as the default.
  112. # set smooth
  113. ## Enable soft line wrapping (AKA full line display).
  114. # set softwrap
  115. ## Use this spelling checker instead of the internal one. This option
  116. ## does not properly have a default value.
  117. ##
  118. set speller "aspell -x -c"
  119. ## Allow nano to be suspended.
  120. # set suspend
  121. ## Use this tab size instead of the default; it must be greater than 0.
  122. set tabsize 4
  123. ## Convert typed tabs to spaces.
  124. #set tabstospaces
  125. ## Save automatically on exit, don't prompt.
  126. # set tempfile
  127. ## Enable the new (EXPERIMENTAL) generic undo code, not just for line
  128. ## cuts.
  129. # set undo
  130. ## Disallow file modification. Why would you want this in an rcfile? ;)
  131. # set view
  132. ## The two single-column characters used to display the first characters
  133. ## of tabs and spaces. 187 in ISO 8859-1 (0000BB in Unicode) and 183 in
  134. ## ISO-8859-1 (0000B7 in Unicode) seem to be good values for these.
  135. # set whitespace " "
  136. ## Detect word boundaries more accurately by treating punctuation
  137. ## characters as parts of words.
  138. # set wordbounds
  139. ## Color setup
  140. ##
  141. ## Format:
  142. ##
  143. ## syntax "short description" ["filename regex" ...]
  144. ##
  145. ## The "none" syntax is reserved; specifying it on the command line is
  146. ## the same as not having a syntax at all. The "default" syntax is
  147. ## special: it takes no filename regexes, and applies to files that
  148. ## don't match any other syntax's filename regexes.
  149. ##
  150. ## color foreground,background "regex" ["regex"...]
  151. ## or
  152. ## icolor foreground,background "regex" ["regex"...]
  153. ##
  154. ## "color" will do case sensitive matches, while "icolor" will do case
  155. ## insensitive matches.
  156. ##
  157. ## Valid colors: white, black, red, blue, green, yellow, magenta, cyan.
  158. ## For foreground colors, you may use the prefix "bright" to get a
  159. ## stronger highlight.
  160. ##
  161. ## To use multi-line regexes, use the start="regex" end="regex"
  162. ## [start="regex" end="regex"...] format.
  163. ##
  164. ## If your system supports transparency, not specifying a background
  165. ## color will use a transparent color. If you don't want this, be sure
  166. ## to set the background color to black or white.
  167. ##
  168. ## If you wish, you may put your syntaxes in separate files. You can
  169. ## make use of such files (which can only include "syntax", "color", and
  170. ## "icolor" commands) as follows:
  171. ##
  172. ## include "/path/to/syntax_file.nanorc"
  173. ##
  174. ## Unless otherwise noted, the name of the syntax file (without the
  175. ## ".nanorc" extension) should be the same as the "short description"
  176. ## name inside that file. These names are kept fairly short to make
  177. ## them easier to remember and faster to type using nano's -Y option.
  178. ##
  179. ## All regexes should be extended regular expressions.
  180. ## Key bindings
  181. ## Please see nanorc(5) for more details on this
  182. ##
  183. ## Here are some samples to get you going
  184. ##
  185. # bind M-W nowrap main
  186. # bind M-A casesens search
  187. # bind ^S research main
  188. ## Set this if your backspace key sends delete most of the time (2.1.3+)
  189. # bind kdel backspace all
  190. ## Nanorc files
  191. #include "/usr/share/nano/nanorc.nanorc"
  192. ## C/C++
  193. include "~/.nano/colors/c.nanorc"
  194. ## Makefiles
  195. include "~/.nano/colors/makefile.nanorc"
  196. ## Cascading Style Sheets
  197. include "~/.nano/colors/css.nanorc"
  198. ## HTML
  199. include "~/.nano/colors/html.nanorc"
  200. ## PHP
  201. include "~/.nano/colors/php.nanorc"
  202. ## JS
  203. include "~/.nano/colors/js.nanorc"
  204. ## TCL
  205. include "~/.nano/colors/tcl.nanorc"
  206. ## TeX
  207. include "~/.nano/colors/tex.nanorc"
  208. ## Quoted emails (under e.g. mutt)
  209. include "~/.nano/colors/mutt.nanorc"
  210. ## Patch files
  211. include "~/.nano/colors/patch.nanorc"
  212. ## Manpages
  213. include "~/.nano/colors/man.nanorc"
  214. ## Groff
  215. include "~/.nano/colors/groff.nanorc"
  216. ## Perl
  217. include "/usr/share/nano/perl.nanorc"
  218. ## Python
  219. include "/usr/share/nano/python.nanorc"
  220. ## Ruby
  221. include "/usr/share/nano/ruby.nanorc"
  222. ## Java
  223. include "/usr/share/nano/java.nanorc"
  224. ## Fortran
  225. include "/usr/share/nano/fortran.nanorc"
  226. ## Objective-C
  227. include "/usr/share/nano/objc.nanorc"
  228. ## OCaml
  229. include "/usr/share/nano/ocaml.nanorc"
  230. ## AWK
  231. include "/usr/share/nano/awk.nanorc"
  232. ## Assembler
  233. include "/usr/share/nano/asm.nanorc"
  234. ## Bourne shell scripts
  235. include "~/.nano/colors/sh.nanorc"
  236. ## POV-Ray
  237. include "/usr/share/nano/pov.nanorc"
  238. ## XML-type files
  239. include "~/.nano/colors/xml.nanorc"
  240. ## Pkgbuild-type
  241. include "~/.nano/colors/pkgbuild.nanorc"