Advertisement
Guest User

Untitled

a guest
May 1st, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.78 KB | None | 0 0
  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.  
  18. ## Use auto-indentation.
  19. set autoindent
  20.  
  21. ## Backup files to filename~.
  22. # set backup
  23.  
  24. ## The directory to put unique backup files in.
  25. # set backupdir ""
  26.  
  27. ## Do backwards searches by default.
  28. # set backwards
  29.  
  30. ## Use bold text instead of reverse video text.
  31. set boldtext
  32.  
  33. ## The characters treated as closing brackets when justifying
  34. ## paragraphs. They cannot contain blank characters. Only closing
  35. ## punctuation, optionally followed by closing brackets, can end
  36. ## sentences.
  37. ##
  38. # set brackets ""')>]}"
  39.  
  40. ## Do case sensitive searches by default.
  41. # set casesensitive
  42.  
  43. ## Constantly display the cursor position in the statusbar. Note that
  44. ## this overrides "quickblank".
  45. set const
  46.  
  47. ## Use cut to end of line by default.
  48. # set cut
  49.  
  50. ## Set the line length for wrapping text and justifying paragraphs.
  51. ## If fill is 0 or less, the line length will be the screen width less
  52. ## this number.
  53. ##
  54. # set fill -8
  55.  
  56. ## Enable ~/.nano_history for saving and reading search/replace strings.
  57. set historylog
  58.  
  59. ## The opening and closing brackets that can be found by bracket
  60. ## searches. They cannot contain blank characters. The former set must
  61. ## come before the latter set, and both must be in the same order.
  62. ##
  63. # set matchbrackets "(<[{)>]}"
  64.  
  65. ## Use the blank line below the titlebar as extra editing space.
  66. # set morespace
  67.  
  68. ## Enable mouse support, if available for your system. When enabled,
  69. ## mouse clicks can be used to place the cursor, set the mark (with a
  70. ## double click), and execute shortcuts. The mouse will work in the X
  71. ## Window System, and on the console when gpm is running.
  72. ##
  73. # set mouse
  74.  
  75. ## Allow multiple file buffers (inserting a file will put it into a
  76. ## separate buffer). You must have configured with --enable-multibuffer
  77. ## for this to work.
  78. ##
  79. # set multibuffer
  80.  
  81. ## Don't convert files from DOS/Mac format.
  82. # set noconvert
  83.  
  84. ## Don't follow symlinks when writing files.
  85. # set nofollow
  86.  
  87. ## Don't display the helpful shortcut lists at the bottom of the screen.
  88. # set nohelp
  89.  
  90. ## Don't add newlines to the ends of files.
  91. # set nonewlines
  92.  
  93. ## Don't wrap text at all.
  94. # set nowrap
  95.  
  96. ## Set operating directory. nano will not read or write files outside
  97. ## this directory and its subdirectories. Also, the current directory
  98. ## is changed to here, so any files are inserted from this dir. A blank
  99. ## string means the operating directory feature is turned off.
  100. ##
  101. # set operatingdir ""
  102.  
  103. ## Preserve the XON and XOFF keys (^Q and ^S).
  104. # set preserve
  105.  
  106. ## The characters treated as closing punctuation when justifying
  107. ## paragraphs. They cannot contain blank characters. Only closing
  108. ## punctuation, optionally followed by closing brackets, can end
  109. ## sentences.
  110. ##
  111. # set punct "!.?"
  112.  
  113. ## Do quick statusbar blanking. Statusbar messages will disappear after
  114. ## 1 keystroke instead of 26. Note that "const" overrides this.
  115. ##
  116. # set quickblank
  117.  
  118. ## The email-quote string, used to justify email-quoted paragraphs.
  119. ## This is an extended regular expression if your system supports them,
  120. ## otherwise a literal string. Default:
  121. # set quotestr "^([ ]*[#:>\|}])+"
  122. ## if you have extended regular expression support, otherwise:
  123. # set quotestr "> "
  124.  
  125. ## Fix Backspace/Delete confusion problem.
  126. # set rebinddelete
  127.  
  128. ## Fix numeric keypad key confusion problem.
  129. # set rebindkeypad
  130.  
  131. ## Do extended regular expression searches by default.
  132. set regexp
  133.  
  134. ## Make the Home key smarter. When Home is pressed anywhere but at the
  135. ## very beginning of non-whitespace characters on a line, the cursor
  136. ## will jump to that beginning (either forwards or backwards). If the
  137. ## cursor is already at that position, it will jump to the true
  138. ## beginning of the line.
  139. set smarthome
  140.  
  141. ## Use smooth scrolling as the default.
  142. set smooth
  143.  
  144. ## Use this spelling checker instead of the internal one. This option
  145. ## does not properly have a default value.
  146. ##
  147. # set speller "aspell -x -c"
  148.  
  149. ## Allow nano to be suspended.
  150. set suspend
  151.  
  152. ## Use this tab size instead of the default; it must be greater than 0.
  153. set tabsize 4
  154.  
  155. ## Convert typed tabs to spaces.
  156. # set tabstospaces
  157.  
  158. ## Save automatically on exit, don't prompt.
  159. # set tempfile
  160.  
  161. ## Disallow file modification. Why would you want this in an rcfile? ;)
  162. # set view
  163.  
  164. ## The two single-column characters used to display the first characters
  165. ## of tabs and spaces. 187 in ISO 8859-1 (0000BB in Unicode) and 183 in
  166. ## ISO-8859-1 (0000B7 in Unicode) seem to be good values for these.
  167. # set whitespace " "
  168.  
  169. ## Detect word boundaries more accurately by treating punctuation
  170. ## characters as parts of words.
  171. # set wordbounds
  172.  
  173. ## Enable the new (EXPERIMENTAL) generic undo code, not just for line cuts
  174. # set undo
  175.  
  176. ## Enable soft line wrapping (AKA full line display)
  177. # set softwrap
  178.  
  179.  
  180. ## Color setup
  181. ##
  182. ## Format:
  183. ##
  184. ## syntax "short description" ["filename regex" ...]
  185. ##
  186. ## The "none" syntax is reserved; specifying it on the command line is
  187. ## the same as not having a syntax at all. The "default" syntax is
  188. ## special: it takes no filename regexes, and applies to files that
  189. ## don't match any other syntax's filename regexes.
  190. ##
  191. ## color foreground,background "regex" ["regex"...]
  192. ## or
  193. ## icolor foreground,background "regex" ["regex"...]
  194. ##
  195. ## "color" will do case sensitive matches, while "icolor" will do case
  196. ## insensitive matches.
  197. ##
  198. ## Valid colors: white, black, red, blue, green, yellow, magenta, cyan.
  199. ## For foreground colors, you may use the prefix "bright" to get a
  200. ## stronger highlight.
  201. ##
  202. ## To use multi-line regexes, use the start="regex" end="regex"
  203. ## [start="regex" end="regex"...] format.
  204. ##
  205. ## If your system supports transparency, not specifying a background
  206. ## color will use a transparent color. If you don't want this, be sure
  207. ## to set the background color to black or white.
  208. ##
  209. ## If you wish, you may put your syntaxes in separate files. You can
  210. ## make use of such files (which can only include "syntax", "color", and
  211. ## "icolor" commands) as follows:
  212. ##
  213. ## include "/path/to/syntax_file.nanorc"
  214. ##
  215. ## Unless otherwise noted, the name of the syntax file (without the
  216. ## ".nanorc" extension) should be the same as the "short description"
  217. ## name inside that file. These names are kept fairly short to make
  218. ## them easier to remember and faster to type using nano's -Y option.
  219. ##
  220. ## All regexes should be extended regular expressions.
  221.  
  222. ## Key bindings
  223. ## Please see nanorc(5) for more details on this
  224. ##
  225. ## Here are some samples to get you going
  226. ##
  227. # bind M-W nowrap main
  228. # bind M-A casesens search
  229. # bind ^S research main
  230.  
  231. ## Set this if your backspace key sends delete most of the time (2.1.3+)
  232. # bind kdel backspace all
  233.  
  234.  
  235. ## Nanorc files
  236. include "/usr/share/nano/nanorc.nanorc"
  237.  
  238. ## C/C++
  239. include "/usr/share/nano/c.nanorc"
  240.  
  241. ## Cascading Style Sheets
  242. include "/usr/share/nano/css.nanorc"
  243.  
  244. ## Debian files
  245. include "/usr/share/nano/debian.nanorc"
  246.  
  247. ## Gentoo files
  248. include "/usr/share/nano/gentoo.nanorc"
  249.  
  250. ## HTML
  251. include "/usr/share/nano/html.nanorc"
  252.  
  253. ## PHP
  254. include "/usr/share/nano/php.nanorc"
  255.  
  256. ## TCL
  257. include "/usr/share/nano/tcl.nanorc"
  258.  
  259. ## TeX
  260. include "/usr/share/nano/tex.nanorc"
  261.  
  262. ## Quoted emails (under e.g. mutt)
  263. include "/usr/share/nano/mutt.nanorc"
  264.  
  265. ## Patch files
  266. include "/usr/share/nano/patch.nanorc"
  267.  
  268. ## Manpages
  269. include "/usr/share/nano/man.nanorc"
  270.  
  271. ## Groff
  272. include "/usr/share/nano/groff.nanorc"
  273.  
  274. ## Perl
  275. include "/usr/share/nano/perl.nanorc"
  276.  
  277. ## Python
  278. include "/usr/share/nano/python.nanorc"
  279.  
  280. ## Ruby
  281. include "/usr/share/nano/ruby.nanorc"
  282.  
  283. ## Java
  284. include "/usr/share/nano/java.nanorc"
  285.  
  286. ## AWK
  287. include "/usr/share/nano/awk.nanorc"
  288.  
  289. ## Assembler
  290. include "/usr/share/nano/asm.nanorc"
  291.  
  292. ## Bourne shell scripts
  293. include "/usr/share/nano/sh.nanorc"
  294.  
  295. ## POV-Ray
  296. include "/usr/share/nano/pov.nanorc"
  297.  
  298. ## XML-type files
  299. include "/usr/share/nano/xml.nanorc"
  300.  
  301. ## syntax highlighting in xorg.conf
  302. ##
  303. syntax "xorg" "xorg\.conf$"
  304. color brightwhite "(Section|EndSection|Sub[sS]ection|EndSub[sS]ection)"
  305. # keywords
  306. color yellow "[^A-Za-z0-9](Identifier|Screen|InputDevice|Option|RightOf|LeftOf|Driver|RgbPath|FontPath|ModulePath|Load|VendorName|ModelName|BoardName|BusID|Device|Monitor|DefaultDepth|View[pP]ort|Depth|Virtual|Modes|Mode|DefaultColorDepth|Modeline|\+vsync|\+hsync|HorizSync|VertRefresh)[^A-Za-z0-9]"
  307. # numbers
  308. color magenta "[0-9]"
  309. # strings
  310. color green ""(\\.|[^\"])*""
  311. # comments
  312. color blue "#.*"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement