Advertisement
PackRat-2017

.nanorc - color and line numbers

Apr 7th, 2023
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.50 KB | None | 0 0
  1. ## Sample initialization file for GNU nano.
  2. ##
  3. ## This file should not be in DOS or Mac format, and characters
  4. ## specially interpreted by the shell should not be escaped here.
  5. ##
  6. ## To make sure an option is disabled, use "unset <option>".
  7. ##
  8. ## For the options that take parameters, the default value is given.
  9. ## Other options are unset by default.
  10. ##
  11. ## Inside string parameters, quotes should not be escaped. The last
  12. ## double quote on the line will be seen as the closing quote.
  13.  
  14. ## Make the 'nextword' function (Ctrl+Right) stop at word ends
  15. ## instead of at beginnings.
  16. # set afterends
  17.  
  18. ## When soft line wrapping is enabled, make it wrap lines at blanks
  19. ## (tabs and spaces) instead of always at the edge of the screen.
  20. # set atblanks
  21.  
  22. ## Automatically indent a newly created line to the same number of
  23. ## tabs and/or spaces as the preceding line -- or as the next line
  24. ## if the preceding line is the beginning of a paragraph.
  25. # set autoindent
  26.  
  27. ## Back up files to the current filename plus a tilde.
  28. # set backup
  29.  
  30. ## The directory to put unique backup files in.
  31. # set backupdir ""
  32.  
  33. ## Use bold text instead of reverse video text.
  34. # set boldtext
  35.  
  36. ## The characters treated as closing brackets when justifying paragraphs.
  37. ## This may not include any blank characters. Only closing punctuation,
  38. ## optionally followed by these closing brackets, can end sentences.
  39. # set brackets ""')>]}"
  40.  
  41. ## Automatically hard-wrap the current line when it becomes overlong.
  42. # set breaklonglines
  43.  
  44. ## Do case-sensitive searches by default.
  45. # set casesensitive
  46.  
  47. ## Constantly display the cursor position in the status bar. Note that
  48. ## this overrides "quickblank".
  49. # set constantshow
  50.  
  51. ## Use cut-from-cursor-to-end-of-line by default.
  52. # set cutfromcursor
  53.  
  54. ## Do not use the line below the title bar, leaving it entirely blank.
  55. # set emptyline
  56.  
  57. ## Enable hard-wrapping and set the target width, both for automatic
  58. ## line wrapping and for justifying paragraphs. If the value is 0 or
  59. ## less, the wrapping point will be the screen width minus this number.
  60. # set fill -8
  61.  
  62. ## Remember the used search/replace strings for the next session.
  63. # set historylog
  64.  
  65. ## Scroll the buffer contents per half-screen instead of per line.
  66. # set jumpyscrolling
  67.  
  68. ## Display line numbers to the left of the text.
  69. set linenumbers
  70.  
  71. ## Enable vim-style lock-files. This is just to let a vim user know you
  72. ## are editing a file [s]he is trying to edit and vice versa. There are
  73. ## no plans to implement vim-style undo state in these files.
  74. # set locking
  75.  
  76. ## The opening and closing brackets that can be found by bracket
  77. ## searches. They cannot contain blank characters. The former set must
  78. ## come before the latter set, and both must be in the same order.
  79. # set matchbrackets "(<[{)>]}"
  80.  
  81. ## Enable mouse support, if available for your system. When enabled,
  82. ## mouse clicks can be used to place the cursor, set the mark (with a
  83. ## double click), and execute shortcuts. The mouse will work in the X
  84. ## Window System, and on the console when gpm is running.
  85. set mouse
  86.  
  87. ## Switch on multiple file buffers (inserting a file will put it into
  88. ## a separate buffer).
  89. # set multibuffer
  90.  
  91. ## Don't convert files from DOS/Mac format.
  92. # set noconvert
  93.  
  94. ## Don't display the helpful shortcut lists at the bottom of the screen.
  95. # set nohelp
  96.  
  97. ## Don't automatically add a newline when a file does not end with one.
  98. # set nonewlines
  99.  
  100. ## Don't pause between warnings at startup. Which means that only the
  101. ## last one will be readable (when there are multiple ones).
  102. # set nopauses
  103.  
  104. ## Set operating directory. nano will not read or write files outside
  105. ## this directory and its subdirectories. Also, the current directory
  106. ## is changed to here, so any files are inserted from this dir. A blank
  107. ## string means the operating-directory feature is turned off.
  108. # set operatingdir ""
  109.  
  110. ## Remember the cursor position in each file for the next editing session.
  111. # set positionlog
  112.  
  113. ## Preserve the XON and XOFF keys (^Q and ^S).
  114. # set preserve
  115.  
  116. ## The characters treated as closing punctuation when justifying
  117. ## paragraphs. They cannot contain blank characters. Only closing
  118. ## punctuation, optionally followed by closing brackets, can end
  119. ## sentences.
  120. # set punct "!.?"
  121.  
  122. ## Do quick status-bar blanking. Status-bar messages will disappear after
  123. ## 1 keystroke instead of 26. Note that "constantshow" overrides this.
  124. # set quickblank
  125.  
  126. ## The regular expression that matches quoting characters in email
  127. ## or line-comment introducers in source code. The default is:
  128. # set quotestr "^([ ]*([!#%:;>|}]|//))+"
  129.  
  130. ## Try to work around a mismatching terminfo terminal description.
  131. # set rawsequences
  132.  
  133. ## Fix Backspace/Delete confusion problem.
  134. # set rebinddelete
  135.  
  136. ## Do regular-expression searches by default.
  137. ## Regular expressions are of the extended type (ERE).
  138. # set regexp
  139.  
  140. ## Put the cursor on the highlighted item in the file browser, and show
  141. ## the cursor in the help viewer; useful for people who use a braille
  142. ## display and people with poor vision.
  143. # set showcursor
  144.  
  145. ## Make the Home key smarter. When Home is pressed anywhere but at the
  146. ## very beginning of non-whitespace characters on a line, the cursor
  147. ## will jump to that beginning (either forwards or backwards). If the
  148. ## cursor is already at that position, it will jump to the true
  149. ## beginning of the line.
  150. # set smarthome
  151.  
  152. ## Enable soft line wrapping (AKA full-line display).
  153. # set softwrap
  154.  
  155. ## Use this spelling checker instead of the internal one. This option
  156. ## does not have a default value.
  157. # set speller "aspell -x -c"
  158.  
  159. ## Allow nano to be suspended.
  160. # set suspend
  161.  
  162. ## Use this tab size instead of the default; it must be greater than 0.
  163. # set tabsize 8
  164.  
  165. ## Convert typed tabs to spaces.
  166. # set tabstospaces
  167.  
  168. ## Save automatically on exit; don't prompt.
  169. # set tempfile
  170.  
  171. ## Snip whitespace at the end of lines when justifying or hard-wrapping.
  172. # set trimblanks
  173.  
  174. ## Disallow file modification. Why would you want this in an rcfile? ;)
  175. # set view
  176.  
  177. ## The two single-column characters used to display the first characters
  178. ## of tabs and spaces. 187 in ISO 8859-1 (0000BB in Unicode) and 183 in
  179. ## ISO-8859-1 (0000B7 in Unicode) seem to be good values for these.
  180. ## The default when in a UTF-8 locale:
  181. # set whitespace "»·"
  182. ## The default otherwise:
  183. # set whitespace ">."
  184.  
  185. ## Detect word boundaries differently by treating punctuation
  186. ## characters as parts of words.
  187. # set wordbounds
  188.  
  189. ## The characters (besides alphanumeric ones) that should be considered
  190. ## as parts of words. This option does not have a default value. When
  191. ## set, it overrides option 'set wordbounds'.
  192. # set wordchars "<_>."
  193.  
  194. ## Let an unmodified Backspace or Delete erase the marked region (instead
  195. ## of a single character, and without affecting the cutbuffer).
  196. # set zap
  197.  
  198. ## Paint the interface elements of nano. These are examples;
  199. ## by default there are no colors, except for errorcolor.
  200. # set titlecolor brightwhite,blue
  201. # set statuscolor brightwhite,green
  202. # set errorcolor brightwhite,red
  203. # set selectedcolor brightwhite,magenta
  204. # set stripecolor ,yellow
  205. set numbercolor blue
  206. # set keycolor cyan
  207. # set functioncolor green
  208. ## In root's .nanorc you might want to use:
  209. # set titlecolor brightwhite,magenta
  210. # set statuscolor brightwhite,magenta
  211. # set errorcolor brightwhite,red
  212. # set selectedcolor brightwhite,cyan
  213. # set stripecolor ,yellow
  214. # set numbercolor magenta
  215. # set keycolor brightmagenta
  216. # set functioncolor magenta
  217.  
  218.  
  219. ## Setup of syntax coloring.
  220. ##
  221. ## Format:
  222. ##
  223. ## syntax "short description" ["filename regex" ...]
  224. ##
  225. ## The "none" syntax is reserved; specifying it on the command line is
  226. ## the same as not having a syntax at all. The "default" syntax is
  227. ## special: it takes no filename regexes, and applies to files that
  228. ## don't match any other syntax's filename regexes.
  229. ##
  230. ## color foreground,background "regex" ["regex"...]
  231. ## or
  232. ## icolor foreground,background "regex" ["regex"...]
  233. ##
  234. ## "color" will do case-sensitive matches, while "icolor" will do
  235. ## case-insensitive matches.
  236. ##
  237. ## Valid color names ares: white, black, normal, red, blue, green,
  238. ## yellow, magenta, cyan. For foreground colors, you may use the
  239. ## prefix "bright" to get a stronger highlight.
  240. ##
  241. ## All regexes (regular expressions) are of the extended type (ERE).
  242. ##
  243. ## To use multi-line regexes, use the start="regex" end="regex"
  244. ## [start="regex" end="regex"...] format.
  245. ##
  246. ## If your system supports transparency, not specifying a background
  247. ## color will use a transparent color. If you don't want this, be sure
  248. ## to set the background color to black or white.
  249. ##
  250. ## If you wish, you may put your syntax definitions in separate files.
  251. ## You can make use of such files as follows:
  252. ##
  253. ## include "/path/to/syntax_file.nanorc"
  254. ##
  255. ## Unless otherwise noted, the name of the syntax file (without the
  256. ## ".nanorc" extension) should be the same as the "short description"
  257. ## name inside that file. These names are kept fairly short to make
  258. ## them easier to remember and faster to type using nano's -Y option.
  259.  
  260. ## To include all existing syntax definitions, you can do:
  261. include "/usr/share/nano/*.nanorc"
  262.  
  263.  
  264. ## Key bindings.
  265. ## See nanorc(5) (section REBINDING KEYS) for more details on this.
  266.  
  267. ## The <Ctrl+Delete> keystroke deletes the word to the right of the cursor.
  268. ## On some terminals the <Ctrl+Backspace> keystroke produces ^H, which is
  269. ## the ASCII character for backspace, so it is bound by default to the
  270. ## backspace function. The <Backspace> key itself produces a different
  271. ## keycode, which is hard-bound to the backspace function. So, if you
  272. ## normally use <Backspace> for backspacing and not ^H, you can make
  273. ## <Ctrl+Backspace> delete the word to the left of the cursor with:
  274. # bind ^H chopwordleft main
  275.  
  276. ## If you would like nano to have keybindings that are more "usual",
  277. ## such as ^O for Open, ^F for Find, ^H for Help, and ^Q for Quit,
  278. ## then uncomment these:
  279. #bind ^Q exit all
  280. #bind ^H help all
  281. #bind ^H exit help
  282. #bind ^F whereis all
  283. #bind ^G findnext all
  284. #bind ^B wherewas all
  285. #bind ^D findprevious all
  286. #bind ^R replace main
  287. #bind ^W writeout main
  288. #bind ^O insert main
  289. #unbind ^V all
  290. #unbind ^Y all
  291. #bind M-X flipnewbuffer all
  292. #bind ^X cut all
  293. #bind ^C copy all
  294. #bind ^V paste all
  295. #bind ^P curpos main
  296. #bind ^T gotoline main
  297. #bind ^T gotodir browser
  298. #bind ^Y speller main
  299. #unbind ^K all
  300. #unbind ^U all
  301. #bind M-R redo main
  302. #bind ^U undo main
  303. #bind ^E redo main
  304. #unbind M-J main
  305. #unbind M-T main
  306. #set multibuffer
  307.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement