Advertisement
yididiel7

.nanorc

Feb 9th, 2024
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.07 KB | None | 0 0
  1. ## Sample initialization file for GNU nano
  2. ## Please note that you must have configured nano with --enable-nanorc
  3. ## for this file to be read! Also note that characters specially
  4. ## interpreted by the shell should not be escaped here.
  5. ##
  6. ## To make sure a value is not enabled, 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. ## Set Line numbers.
  12. set linenumbers
  13.  
  14. ## Show the current line number.
  15. set constantshow
  16. ## Set the background title bar color.
  17. set titlecolor red
  18.  
  19. ## Set statuscolor.
  20. set statuscolor yellow
  21.  
  22. ## Set functioncolor M-U Area
  23. set functioncolor red
  24.  
  25. ## Set numbercolor line number area
  26. set numbercolor white
  27.  
  28. ## Set Bold text.
  29. set boldtext
  30.  
  31. ## Use auto-indentation
  32. # set autoindent
  33.  
  34. ## Backup files to filename~
  35. # set backup
  36.  
  37. ## Constantly display the cursor position in the status bar.
  38. # set const
  39.  
  40. ## Use cut to end of line with ^K by default
  41. # set cut
  42.  
  43. ## Set the line length for wrapping text and justifying paragraphs.
  44. ## If fill is negative, the line length will be the screen width less
  45. ## this number.
  46. ##
  47. # set fill -8
  48.  
  49. ## Enable ~/.nano_history for saving and reading search/replace strings.
  50. # set historylog
  51.  
  52. ## Use alternate keypad routines
  53. # set keypad
  54.  
  55. ## Allow multiple file buffers (using ^R inserts into separate buffer).
  56. ## You must have configured with --enable-multibuffer or --enable-extra
  57. ## for this to work.
  58. ##
  59. ## set multibuffer
  60.  
  61. ## Don't convert files from DOS/Mac format
  62. # set noconvert
  63.  
  64. ## Don't follow symlinks when writing files
  65. # set nofollow
  66.  
  67. ## Don't display the help lists at the bottom of the screen
  68. # set nohelp
  69.  
  70. ## Don't wrap text at all
  71. # set nowrap
  72.  
  73. ## Set operating directory. nano will not read or write files outside
  74. ## this directory and its subdirectories. Also, the current directory
  75. ## is changed to here, so files are inserted from this dir. A blank
  76. ## string means the operating directory feature is turned off.
  77. ##
  78. # set operatingdir ""
  79.  
  80. ## Preserve the XON and XOFF keys (^Q and ^S)
  81. # set preserve
  82.  
  83. ## The email-quote string, used to justify email-quoted paragraphs.
  84. ## This is an extended regular expression if your system supports them,
  85. ## otherwise a literal string. Default:
  86. # set quotestr "^([ ]*[\|>:}#])+"
  87. ## if you have regexps, otherwise:
  88. # set quotestr "> "
  89. ## You can get old nano quoted-justify behavior via:
  90. # set quotestr "(> )+"
  91.  
  92. ## Do extended regular expression searches by default
  93. # set regexp
  94.  
  95. ## Use smooth scrolling as the default
  96. # set smooth
  97.  
  98. ## Use this spelling checker instead of the internal one. This option
  99. ## does not properly have a default value.
  100. ##
  101. # set speller "aspell -c"
  102.  
  103. ## Allow nano to be suspended with ^Z
  104. # set suspend
  105.  
  106. ## Use this tab size instead of the default; it must be greater than 0
  107. # set tabsize 8
  108.  
  109. ## Save automatically on exit, don't prompt
  110. # set tempfile
  111.  
  112. ## Disallow file modification, why would you want this in an rc file? ;)
  113. # set view
  114.  
  115. ## Color setup
  116. ## Format:
  117. ## syntax "short description" ["filename regex" ...]
  118. ## color foreground,background "regex" ["regex"...]
  119. ##
  120. ## Legal colors: white, black, red, blue, green, yellow, magenta, cyan.
  121. ## You may use the prefix "bright" to mean a stronger color highlight.
  122. ##
  123. ## To use multi-line regexes use the start="regex" end="regex" format.
  124. ##
  125. ## If your system supports transparency, not specifying a background
  126. ## color will use a transparent color. If you don't want this, be sure
  127. ## to set the background color to black or white.
  128. ##
  129. # syntax "c-file" "\.(c|h)$"
  130. # color red "\<[A-Z_]{2,}\>"
  131. # color green "\<(float|char|int|void|static|const|struct)\>"
  132. # color brightyellow "\<(if|while|do|else|case|switch)\>"
  133. # color brightcyan "^#( )*(define|include|ifn?def|endif|elif|else|if)"
  134. ##
  135. ## You will in general want your comments and strings to come last,
  136. ## because syntax highlighting rules will be applied in the order they
  137. ## are read in.
  138. ##
  139. # color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
  140. ##
  141. ## This string is VERY resource intensive!!!
  142. # color brightyellow start=""(\\.|[^\"])*\\( | )*$" end="^(\\.|[^\"])*""
  143. ##
  144. ## And we want to have some nice comment highlighting too
  145. # color brightblue "//.*"
  146. # color brightblue start="/\*" end="\*/"
  147.  
  148. ## Here is a short example for HTML
  149. # syntax "HTML" "\.html$"
  150. # color blue start="<" end=">"
  151. # color red "&[^; ]*;"
  152.  
  153. ## Here is a short example for TeX files
  154. # syntax "TeX" "\.tex$"
  155. # color green "\\.|\\[A-Za-z]*"
  156. # color magenta "[{}]"
  157. # color blue "%.*"
  158.  
  159. ## Here is an example for quoted emails (under e.g. mutt)
  160. # syntax "mutt"
  161. # color green "^>.*"
  162.  
  163. ## Here is an example for groff
  164. ##
  165. # syntax "groff" "\.ms$" "\.mm$" "\.me$" "\.tmac$" "^tmac." ".rof"
  166. ## The argument of .nr or .ds
  167. # color cyan "^\.ds [^ ]*"
  168. # color cyan "^\.nr [^ ]*"
  169. ## Single character escapes
  170. # color brightmagenta "\\."
  171. ## Highlight the argument of \f or \s in the same color
  172. # color brightmagenta "\\f."
  173. # color brightmagenta "\\f\(.."
  174. # color brightmagenta "\\s(\+|\-)?[0-9]"
  175. ## \n
  176. # color cyan "(\\|\\\\)n."
  177. # color cyan "(\\|\\\\)n\(.."
  178. # color cyan start="(\\|\\\\)n\[" end="]"
  179. ## Requests
  180. # color brightgreen "^\. *[^ ]*"
  181. ## Comments
  182. # color yellow "^\.\\\".*$"
  183. ## Strings
  184. # color green "(\\|\\\\)\*."
  185. # color green "(\\|\\\\)\*\(.."
  186. # color green start="(\\|\\\\)\*\[" end="]"
  187. ## Characters
  188. # color brightred "\\\(.."
  189. # color brightred start="\\\[" end="]"
  190. ## Macro arguments
  191. # color brightcyan "\\\\\$[1-9]"
  192.  
  193. ## Here is an example for perl
  194. ##
  195. # syntax "perl" "\.p[lm]$"
  196. # color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork)|get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join|keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek|seekdir|se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr|y|truncate|umask|un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
  197. # color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
  198. # color cyan start="[$@%]" end="( |\\W|-)"
  199. # color yellow "".*"|qq\|.*\|"
  200. # color white "[sm]/.*/"
  201. # color white start="(^use| = new)" end=";"
  202. # color green "#.*"
  203. # color yellow start="<< 'STOP'" end="STOP"
  204.  
  205. ## Here is an example for Java source
  206. ##
  207. # syntax "Java source" "\.java$"
  208. # color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
  209. # color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
  210. # color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>"
  211. # color red ""[^\"]*""
  212. # color yellow "\<(true|false|null)\>"
  213. # color blue "//.*"
  214. # color blue start="/\*" end="\*/"
  215. # color brightblue start="/\*\*" end="\*/"
  216. # color brightgreen,brightgreen "[ ]+$"
  217.  
  218. ## Here is an example for your .nanorc
  219. ##
  220. # syntax "nanorc" "[\.]*nanorc$"
  221. # color white "^ *(set|unset).*$"
  222. # color cyan "^ *(set|unset) (autoindent|backup|const|cut|fill|keypad|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|quotestr|regexp|smooth|speller|suspend|tabsize|tempfile|historylog|view)"
  223. # color brightwhite "^ *syntax [^ ]*"
  224. # color brightblue "^ *set\>" "^ *unset\>" "^ *syntax\>"
  225. # color white "^ *color\>.*"
  226. # color yellow "^ *color (bright)?(white|black|red|blue|green|yellow|magenta|cyan)\>"
  227. # color magenta "^ *color\>"
  228. # color green "^#.*$"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement