phatboislym

nanorc

Nov 3rd, 2022 (edited)
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 10.18 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. ## Set the target width for automatic hard-wrapping and for justifying
  58. ## paragraphs.  If the specified value is 0 or less, the wrapping point
  59. ## will be the terminal's 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. set smooth
  68.  
  69. ## Display line numbers to the left of the text.
  70. set linenumbers
  71.  
  72. ## Enable vim-style lock-files.  This is just to let a vim user know you
  73. ## are editing a file [s]he is trying to edit and vice versa.  There are
  74. ## no plans to implement vim-style undo state in these files.
  75. set locking
  76.  
  77. ## Fall back to slow libmagic to try and determine an applicable syntax.
  78. #set magic
  79.  
  80. ## The opening and closing brackets that can be found by bracket
  81. ## searches.  They cannot contain blank characters.  The former set must
  82. ## come before the latter set, and both must be in the same order.
  83.  set matchbrackets "(<[{)>]}"
  84.  
  85. ## Enable mouse support, if available for your system.  When enabled,
  86. ## mouse clicks can be used to place the cursor, set the mark (with a
  87. ## double click), and execute shortcuts.  The mouse will work in the X
  88. ## Window System, and on the console when gpm is running.
  89. # set mouse
  90.  
  91. ## Switch on multiple file buffers (inserting a file will put it into
  92. ## a separate buffer).
  93. # set multibuffer
  94.  
  95. ## Don't convert files from DOS/Mac format.
  96. # set noconvert
  97.  
  98. ## Don't display the helpful shortcut lists at the bottom of the screen.
  99. # set nohelp
  100.  
  101. ## Don't automatically add a newline when a file does not end with one.
  102. # set nonewlines
  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 cyan
  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. ##   syntax "name" ["filename regex" ...]
  222. ##
  223. ##   color|icolor foreground,background "regex" ["regex"...]
  224. ##   [...]
  225. ##
  226. ## 'color' will do case-sensitive matches, while 'icolor' will do
  227. ## case-insensitive matches.
  228. ##
  229. ## All color commands are applied in the order in which they are specified,
  230. ## meaning that later commands can recolor stuff that was colored earlier.
  231. ##
  232. ## Valid color names for foreground and background are: white, black, normal,
  233. ## red, blue, green, yellow, magenta, cyan.  For foreground colors, you may
  234. ## use the prefix "bright" to get a stronger highlight.
  235. ##
  236. ## All regexes (regular expressions) are of the extended type (ERE).
  237. ##
  238. ## If the coloring rule should span multiple lines, use the following format:
  239. ##
  240. ##   color fg,bg  start="regex" end="regex"
  241. ##
  242. ## If you wish, you may put your syntax definitions in separate files.
  243. ## You can make use of such files as follows:
  244. ##
  245. ##   include "/path/to/syntax_file.nanorc"
  246.  
  247. ## To include all existing syntax definitions, you can do:
  248. include "/usr/share/nano/*.nanorc"
  249.  
  250.  
  251. ## If <Tab> should always produce four spaces when editing a Python file,
  252. ## independent of the settings of 'tabsize' and 'tabstospaces':
  253. extendsyntax python tabgives "    "
  254.  
  255. ## If <Tab> should always produce an actual TAB when editing a Makefile:
  256. # extendsyntax makefile tabgives "  "
  257.  
  258.  
  259. ## Key bindings.
  260. ## See nanorc(5) (section REBINDING KEYS) for more details on this.
  261.  
  262. ## The <Ctrl+Delete> keystroke deletes the word to the right of the cursor.
  263. ## On some terminals the <Ctrl+Backspace> keystroke produces ^H, which is
  264. ## the ASCII character for backspace, so it is bound by default to the
  265. ## backspace function.  The <Backspace> key itself produces a different
  266. ## keycode, which is hard-bound to the backspace function.  So, if you
  267. ## normally use <Backspace> for backspacing and not ^H, you can make
  268. ## <Ctrl+Backspace> delete the word to the left of the cursor with:
  269. # bind ^H chopwordleft main
  270.  
  271. ## If you would like nano to have keybindings that are more "usual",
  272. ## such as ^O for Open, ^F for Find, ^H for Help, and ^Q for Quit,
  273. ## then uncomment these:
  274. #bind ^Q exit all
  275. #bind ^S savefile main
  276. #bind ^W writeout main
  277. #bind ^O insert main
  278. #bind ^H help all
  279. #bind ^H exit help
  280. #bind ^F whereis all
  281. #bind ^G findnext all
  282. #bind ^B wherewas all
  283. #bind ^D findprevious all
  284. #bind ^R replace main
  285. #bind M-X flipnewbuffer all
  286. #bind ^X cut all
  287. #bind ^C copy main
  288. #bind ^V paste all
  289. #bind ^P curpos main
  290. #bind ^A mark main
  291. #unbind ^K main
  292. #unbind ^U all
  293. #unbind ^N main
  294. #unbind ^Y all
  295. #unbind M-J main
  296. #unbind M-T main
  297. #bind ^T gotoline main
  298. #bind ^T gotodir browser
  299. #bind ^Y speller main
  300. #bind M-U undo main
  301. #bind M-R redo main
  302. #bind ^U undo main
  303. #bind ^E redo main
  304. #set multibuffer
  305.  
Advertisement
Add Comment
Please, Sign In to add comment