jsmdcui 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/LICENSE +22 -0
  3. package/README.md +285 -0
  4. package/package.json +17 -0
  5. package/project_structure.txt +35 -0
  6. package/runmd.mjs +240 -0
  7. package/runtime/colorschemes/atom-dark.micro +33 -0
  8. package/runtime/colorschemes/bubblegum.micro +31 -0
  9. package/runtime/colorschemes/cmc-16.micro +47 -0
  10. package/runtime/colorschemes/cmc-tc.micro +43 -0
  11. package/runtime/colorschemes/darcula.micro +34 -0
  12. package/runtime/colorschemes/default.micro +1 -0
  13. package/runtime/colorschemes/dracula-tc.micro +49 -0
  14. package/runtime/colorschemes/dukedark-tc.micro +38 -0
  15. package/runtime/colorschemes/dukelight-tc.micro +38 -0
  16. package/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
  17. package/runtime/colorschemes/geany.micro +29 -0
  18. package/runtime/colorschemes/gotham.micro +29 -0
  19. package/runtime/colorschemes/gruvbox-tc.micro +29 -0
  20. package/runtime/colorschemes/gruvbox.micro +26 -0
  21. package/runtime/colorschemes/material-tc.micro +36 -0
  22. package/runtime/colorschemes/monokai-dark.micro +28 -0
  23. package/runtime/colorschemes/monokai.micro +34 -0
  24. package/runtime/colorschemes/one-dark.micro +39 -0
  25. package/runtime/colorschemes/railscast.micro +37 -0
  26. package/runtime/colorschemes/simple.micro +33 -0
  27. package/runtime/colorschemes/solarized-tc.micro +31 -0
  28. package/runtime/colorschemes/solarized.micro +30 -0
  29. package/runtime/colorschemes/sunny-day.micro +29 -0
  30. package/runtime/colorschemes/twilight.micro +40 -0
  31. package/runtime/colorschemes/zenburn.micro +30 -0
  32. package/runtime/help/actions.md +161 -0
  33. package/runtime/help/cdp.md +119 -0
  34. package/runtime/help/colors.md +421 -0
  35. package/runtime/help/commands.md +161 -0
  36. package/runtime/help/copypaste.md +149 -0
  37. package/runtime/help/defaultkeys.md +148 -0
  38. package/runtime/help/help.md +285 -0
  39. package/runtime/help/keybindings.md +355 -0
  40. package/runtime/help/linter.md +90 -0
  41. package/runtime/help/options.md +709 -0
  42. package/runtime/help/plugins.md +544 -0
  43. package/runtime/help/tutorial.md +112 -0
  44. package/runtime/jsplugins/cdp/cdp-server.js +1161 -0
  45. package/runtime/jsplugins/cdp/cdp.js +192 -0
  46. package/runtime/jsplugins/chapter/chapter.js +108 -0
  47. package/runtime/jsplugins/diff/diff.js +46 -0
  48. package/runtime/jsplugins/example/example.js +110 -0
  49. package/runtime/jsplugins/linter/linter.js +281 -0
  50. package/runtime/plugins/autoclose/autoclose.lua +75 -0
  51. package/runtime/plugins/ftoptions/ftoptions.lua +17 -0
  52. package/runtime/plugins/literate/README.md +5 -0
  53. package/runtime/plugins/literate/literate.lua +55 -0
  54. package/runtime/plugins/status/help/status.md +21 -0
  55. package/runtime/plugins/status/status.lua +62 -0
  56. package/runtime/syntax/LICENSE +22 -0
  57. package/runtime/syntax/PowerShell.yaml +128 -0
  58. package/runtime/syntax/README.md +63 -0
  59. package/runtime/syntax/ada.yaml +43 -0
  60. package/runtime/syntax/apacheconf.yaml +59 -0
  61. package/runtime/syntax/arduino.yaml +101 -0
  62. package/runtime/syntax/asciidoc.yaml +51 -0
  63. package/runtime/syntax/asm.yaml +123 -0
  64. package/runtime/syntax/ats.yaml +99 -0
  65. package/runtime/syntax/awk.yaml +44 -0
  66. package/runtime/syntax/b.yaml +87 -0
  67. package/runtime/syntax/bat.yaml +57 -0
  68. package/runtime/syntax/c.yaml +60 -0
  69. package/runtime/syntax/caddyfile.yaml +23 -0
  70. package/runtime/syntax/cake.yaml +7 -0
  71. package/runtime/syntax/clojure.yaml +38 -0
  72. package/runtime/syntax/cmake.yaml +42 -0
  73. package/runtime/syntax/coffeescript.yaml +56 -0
  74. package/runtime/syntax/colortest.yaml +19 -0
  75. package/runtime/syntax/conky.yaml +17 -0
  76. package/runtime/syntax/cpp.yaml +91 -0
  77. package/runtime/syntax/crontab.yaml +36 -0
  78. package/runtime/syntax/crystal.yaml +72 -0
  79. package/runtime/syntax/csharp.yaml +52 -0
  80. package/runtime/syntax/css.yaml +44 -0
  81. package/runtime/syntax/csx.yaml +8 -0
  82. package/runtime/syntax/cuda.yaml +68 -0
  83. package/runtime/syntax/cython.yaml +52 -0
  84. package/runtime/syntax/d.yaml +121 -0
  85. package/runtime/syntax/dart.yaml +46 -0
  86. package/runtime/syntax/default.yaml +10 -0
  87. package/runtime/syntax/dockerfile.yaml +36 -0
  88. package/runtime/syntax/dot.yaml +29 -0
  89. package/runtime/syntax/elixir.yaml +30 -0
  90. package/runtime/syntax/elm.yaml +38 -0
  91. package/runtime/syntax/erb.yaml +42 -0
  92. package/runtime/syntax/erlang.yaml +45 -0
  93. package/runtime/syntax/fish.yaml +48 -0
  94. package/runtime/syntax/forth.yaml +34 -0
  95. package/runtime/syntax/fortran.yaml +64 -0
  96. package/runtime/syntax/freebsd-kernel.yaml +14 -0
  97. package/runtime/syntax/fsharp.yaml +48 -0
  98. package/runtime/syntax/gdscript.yaml +61 -0
  99. package/runtime/syntax/gemini.yaml +19 -0
  100. package/runtime/syntax/gentoo-ebuild.yaml +48 -0
  101. package/runtime/syntax/gentoo-etc-portage.yaml +23 -0
  102. package/runtime/syntax/git-commit.yaml +35 -0
  103. package/runtime/syntax/git-config.yaml +14 -0
  104. package/runtime/syntax/git-rebase-todo.yaml +19 -0
  105. package/runtime/syntax/gleam.yaml +69 -0
  106. package/runtime/syntax/glsl.yaml +26 -0
  107. package/runtime/syntax/gnuplot.yaml +15 -0
  108. package/runtime/syntax/go.yaml +62 -0
  109. package/runtime/syntax/godoc.yaml +17 -0
  110. package/runtime/syntax/golo.yaml +73 -0
  111. package/runtime/syntax/gomod.yaml +31 -0
  112. package/runtime/syntax/graphql.yaml +47 -0
  113. package/runtime/syntax/groff.yaml +30 -0
  114. package/runtime/syntax/groovy.yaml +111 -0
  115. package/runtime/syntax/haml.yaml +16 -0
  116. package/runtime/syntax/hare.yaml +52 -0
  117. package/runtime/syntax/haskell.yaml +52 -0
  118. package/runtime/syntax/hc.yaml +52 -0
  119. package/runtime/syntax/html.yaml +70 -0
  120. package/runtime/syntax/html4.yaml +25 -0
  121. package/runtime/syntax/html5.yaml +25 -0
  122. package/runtime/syntax/ini.yaml +23 -0
  123. package/runtime/syntax/inputrc.yaml +14 -0
  124. package/runtime/syntax/java.yaml +37 -0
  125. package/runtime/syntax/javascript.yaml +124 -0
  126. package/runtime/syntax/jinja2.yaml +19 -0
  127. package/runtime/syntax/json.yaml +39 -0
  128. package/runtime/syntax/jsonnet.yaml +92 -0
  129. package/runtime/syntax/julia.yaml +57 -0
  130. package/runtime/syntax/justfile.yaml +40 -0
  131. package/runtime/syntax/keymap.yaml +27 -0
  132. package/runtime/syntax/kickstart.yaml +16 -0
  133. package/runtime/syntax/kotlin.yaml +66 -0
  134. package/runtime/syntax/kvlang.yaml +67 -0
  135. package/runtime/syntax/ledger.yaml +14 -0
  136. package/runtime/syntax/lfe.yaml +17 -0
  137. package/runtime/syntax/lilypond.yaml +26 -0
  138. package/runtime/syntax/lisp.yaml +17 -0
  139. package/runtime/syntax/log.yaml +92 -0
  140. package/runtime/syntax/lua.yaml +111 -0
  141. package/runtime/syntax/mail.yaml +25 -0
  142. package/runtime/syntax/makefile.yaml +38 -0
  143. package/runtime/syntax/man.yaml +12 -0
  144. package/runtime/syntax/markdown.yaml +49 -0
  145. package/runtime/syntax/mc.yaml +23 -0
  146. package/runtime/syntax/meson.yaml +51 -0
  147. package/runtime/syntax/micro.yaml +34 -0
  148. package/runtime/syntax/mpdconf.yaml +13 -0
  149. package/runtime/syntax/msbuild.yaml +6 -0
  150. package/runtime/syntax/nanorc.yaml +16 -0
  151. package/runtime/syntax/nftables.yaml +30 -0
  152. package/runtime/syntax/nginx.yaml +22 -0
  153. package/runtime/syntax/nim.yaml +27 -0
  154. package/runtime/syntax/nix.yaml +32 -0
  155. package/runtime/syntax/nu.yaml +114 -0
  156. package/runtime/syntax/objc.yaml +60 -0
  157. package/runtime/syntax/ocaml.yaml +43 -0
  158. package/runtime/syntax/octave.yaml +83 -0
  159. package/runtime/syntax/odin.yaml +64 -0
  160. package/runtime/syntax/pascal.yaml +45 -0
  161. package/runtime/syntax/patch.yaml +14 -0
  162. package/runtime/syntax/peg.yaml +16 -0
  163. package/runtime/syntax/perl.yaml +58 -0
  164. package/runtime/syntax/php.yaml +60 -0
  165. package/runtime/syntax/pkg-config.yaml +12 -0
  166. package/runtime/syntax/po.yaml +12 -0
  167. package/runtime/syntax/pony.yaml +37 -0
  168. package/runtime/syntax/pov.yaml +21 -0
  169. package/runtime/syntax/privoxy-action.yaml +14 -0
  170. package/runtime/syntax/privoxy-config.yaml +10 -0
  171. package/runtime/syntax/privoxy-filter.yaml +12 -0
  172. package/runtime/syntax/proto.yaml +40 -0
  173. package/runtime/syntax/prql.yaml +84 -0
  174. package/runtime/syntax/puppet.yaml +22 -0
  175. package/runtime/syntax/python2.yaml +60 -0
  176. package/runtime/syntax/python3.yaml +80 -0
  177. package/runtime/syntax/r.yaml +32 -0
  178. package/runtime/syntax/raku.yaml +42 -0
  179. package/runtime/syntax/reST.yaml +18 -0
  180. package/runtime/syntax/renpy.yaml +15 -0
  181. package/runtime/syntax/rpmspec.yaml +43 -0
  182. package/runtime/syntax/ruby.yaml +73 -0
  183. package/runtime/syntax/rust.yaml +78 -0
  184. package/runtime/syntax/sage.yaml +60 -0
  185. package/runtime/syntax/scad.yaml +53 -0
  186. package/runtime/syntax/scala.yaml +33 -0
  187. package/runtime/syntax/sed.yaml +13 -0
  188. package/runtime/syntax/sh.yaml +69 -0
  189. package/runtime/syntax/sls.yaml +15 -0
  190. package/runtime/syntax/smalltalk.yaml +55 -0
  191. package/runtime/syntax/solidity.yaml +41 -0
  192. package/runtime/syntax/sql.yaml +35 -0
  193. package/runtime/syntax/stata.yaml +67 -0
  194. package/runtime/syntax/svelte.yaml +27 -0
  195. package/runtime/syntax/swift.yaml +103 -0
  196. package/runtime/syntax/systemd.yaml +16 -0
  197. package/runtime/syntax/tcl.yaml +18 -0
  198. package/runtime/syntax/terraform.yaml +87 -0
  199. package/runtime/syntax/tex.yaml +32 -0
  200. package/runtime/syntax/toml.yaml +56 -0
  201. package/runtime/syntax/twig.yaml +55 -0
  202. package/runtime/syntax/typescript.yaml +49 -0
  203. package/runtime/syntax/v.yaml +80 -0
  204. package/runtime/syntax/vala.yaml +26 -0
  205. package/runtime/syntax/verilog.yaml +60 -0
  206. package/runtime/syntax/vhdl.yaml +37 -0
  207. package/runtime/syntax/vi.yaml +31 -0
  208. package/runtime/syntax/vue.yaml +64 -0
  209. package/runtime/syntax/xml.yaml +37 -0
  210. package/runtime/syntax/xresources.yaml +14 -0
  211. package/runtime/syntax/yaml.yaml +34 -0
  212. package/runtime/syntax/yum.yaml +12 -0
  213. package/runtime/syntax/zig.yaml +52 -0
  214. package/runtime/syntax/zscript.yaml +72 -0
  215. package/runtime/syntax/zsh.yaml +52 -0
  216. package/single-exe/README.md +80 -0
  217. package/single-exe/assetsHelper.js +90 -0
  218. package/single-exe/assetsLoader.mjs +85 -0
  219. package/single-exe/compiled.js +149 -0
  220. package/single-exe/entry.mjs +9 -0
  221. package/single-exe/packAssets.sh +7 -0
  222. package/src/buffer/backup.js +160 -0
  223. package/src/buffer/buffer.js +126 -0
  224. package/src/buffer/fixed3-codec.js +140 -0
  225. package/src/buffer/loc.js +38 -0
  226. package/src/buffer/message.js +29 -0
  227. package/src/config/clean.js +172 -0
  228. package/src/config/colorscheme.js +99 -0
  229. package/src/config/config.js +122 -0
  230. package/src/config/defaults.js +109 -0
  231. package/src/cui/rpc.mjs +259 -0
  232. package/src/cui/server.mjs +116 -0
  233. package/src/display/ansi-style.js +60 -0
  234. package/src/highlight/highlighter.js +243 -0
  235. package/src/highlight/parser.js +225 -0
  236. package/src/index.js +8009 -0
  237. package/src/lua/engine.js +71 -0
  238. package/src/platform/archive.js +50 -0
  239. package/src/platform/clipboard.js +278 -0
  240. package/src/platform/commands.js +137 -0
  241. package/src/plugins/js-bridge.js +983 -0
  242. package/src/plugins/manager.js +674 -0
  243. package/src/runtime/assets.js +90 -0
  244. package/src/runtime/compiled.js +25 -0
  245. package/src/runtime/encodings.js +10 -0
  246. package/src/runtime/registry.js +134 -0
  247. package/src/screen/cell-buffer.js +81 -0
  248. package/src/screen/events.js +263 -0
  249. package/src/screen/screen.js +142 -0
  250. package/src/screen/vt100.js +571 -0
  251. package/src/shell/shell.js +70 -0
  252. package/testapp.md +55 -0
  253. package/tests/backup.test.js +133 -0
  254. package/tests/cmphex3b64.js +95 -0
  255. package/tests/pty-demo.js +492 -0
  256. package/tests/wv-client.js +96 -0
  257. package/tui +5 -0
  258. package/wui +5 -0
@@ -0,0 +1,709 @@
1
+ # Options
2
+
3
+ Micro stores all of the user configuration in its configuration directory.
4
+
5
+ Micro uses `$MICRO_CONFIG_HOME` as the configuration directory. If this
6
+ environment variable is not set, it uses `$XDG_CONFIG_HOME/micro` instead. If
7
+ that environment variable is not set, it uses `~/.config/micro` as the
8
+ configuration directory. In the documentation, we use `~/.config/micro` to
9
+ refer to the configuration directory (even if it may in fact be somewhere else
10
+ if you have set either of the above environment variables).
11
+
12
+ Here are the available options:
13
+
14
+ * `autoindent`: when creating a new line, use the same indentation as the
15
+ previous line.
16
+
17
+ default value: `true`
18
+
19
+ * `autosave`: automatically save the buffer every n seconds, where n is the
20
+ value of the autosave option. Also when quitting on a modified buffer, micro
21
+ will automatically save and quit. Be warned, this option saves the buffer
22
+ without prompting the user, so data may be overwritten. If this option is
23
+ set to `0`, no autosaving is performed.
24
+
25
+ default value: `0`
26
+
27
+ * `autosu`: When a file is saved that the user doesn't have permission to
28
+ modify, micro will ask if the user would like to use super user
29
+ privileges to save the file. If this option is enabled, micro will
30
+ automatically attempt to use super user privileges to save without
31
+ asking the user.
32
+
33
+ default value: `false`
34
+
35
+ * `backup`: micro will automatically keep backups of all open buffers. Backups
36
+ are stored in `~/.config/micro/backups` and are removed when the buffer is
37
+ closed cleanly. In the case of a system crash or a micro crash, the contents
38
+ of the buffer can be recovered automatically by opening the file that was
39
+ being edited before the crash, or manually by searching for the backup in
40
+ the backup directory. Backups are made in the background for newly modified
41
+ buffers every 8 seconds, or when micro detects a crash.
42
+
43
+ default value: `true`
44
+
45
+ * `backupdir`: the directory micro should place backups in. For the default
46
+ value of `""` (empty string), the backup directory will be
47
+ `ConfigDir/backups`, which is `~/.config/micro/backups` by default. The
48
+ directory specified for backups will be created if it does not exist.
49
+
50
+ default value: `""` (empty string)
51
+
52
+ * `basename`: in the infobar and tabbar, show only the basename of the file
53
+ being edited rather than the full path.
54
+
55
+ default value: `false`
56
+
57
+ * `clipboard`: specifies how micro should access the system clipboard.
58
+ Possible values are:
59
+ * `external`: accesses clipboard via an external tool, such as xclip/xsel
60
+ or wl-clipboard on Linux, pbcopy/pbpaste on MacOS, and system calls on
61
+ Windows. On Linux, if you do not have one of the tools installed, or if
62
+ they are not working, micro will throw an error and use an internal
63
+ clipboard.
64
+ * `terminal`: accesses the clipboard via your terminal emulator. Note that
65
+ there is limited support among terminal emulators for this feature
66
+ (called OSC 52). Terminals that are known to work are Kitty (enable
67
+ reading with `clipboard_control` setting), iTerm2 (only copying),
68
+ st, rxvt-unicode and xterm if enabled (see `> help copypaste` for
69
+ details). Note that Gnome-terminal does not support this feature. With
70
+ this setting, copy-paste **will** work over ssh. See `> help copypaste`
71
+ for details.
72
+ * `internal`: micro will use an internal clipboard.
73
+
74
+ default value: `external`
75
+
76
+ * `colorcolumn`: if this is not set to 0, it will display a column at the
77
+ specified column. This is useful if you want column 80 to be highlighted
78
+ special for example.
79
+
80
+ default value: `0`
81
+
82
+ * `colorscheme`: use the given colorscheme. This setting is `global only`.
83
+ The colorscheme can be either one of the colorschemes that micro comes with
84
+ by default (such as `default`, `solarized` or `solarized-tc`) which are
85
+ embedded in the micro binary, or a custom colorscheme stored in
86
+ `~/.config/micro/colorschemes/$(option).micro` where `$(option)` is the
87
+ option value. You can read more about micro's colorschemes and see the list
88
+ of default colorschemes in `> help colors`.
89
+
90
+ default value: `default`
91
+
92
+ * `cursorline`: highlight the line that the cursor is on in a different color
93
+ (the color is defined by the colorscheme you are using).
94
+
95
+ default value: `true`
96
+
97
+ * `cursorshape`: sets the editor cursor shape using the terminal's DECSCUSR
98
+ support. This setting is `global only`. Supported values are `default`,
99
+ `block`, `underline`, `bar`, and their `blinking-` variants. The plain
100
+ shape names use a steady cursor.
101
+
102
+ default value: `block`
103
+
104
+ * `detectlimit`: if this is not set to 0, it will limit the amount of first
105
+ lines in a file that are matched to determine the filetype.
106
+ A higher limit means better accuracy of guessing the filetype, but also
107
+ taking more time.
108
+
109
+ default value: `100`
110
+
111
+ * `diffgutter`: display diff indicators before lines.
112
+
113
+ default value: `false`
114
+
115
+ * `divchars`: specifies the "divider" characters used for the dividing line
116
+ between vertical/horizontal splits. The first character is for vertical
117
+ dividers, and the second is for horizontal dividers. By default, for
118
+ horizontal splits the statusline serves as a divider, but if the statusline
119
+ is disabled the horizontal divider character will be used.
120
+
121
+ default value: `|-`
122
+
123
+ * `divreverse`: colorschemes provide the color (foreground and background) for
124
+ the characters displayed in split dividers. With this option enabled, the
125
+ colors specified by the colorscheme will be reversed (foreground and
126
+ background colors swapped).
127
+
128
+ default value: `true`
129
+
130
+ * `encoding`: the encoding to open and save files with. Supported encodings
131
+ are listed at https://www.w3.org/TR/encoding/.
132
+
133
+ default value: `utf-8`
134
+
135
+ * `eofnewline`: micro will automatically add a newline to the end of the
136
+ file if one does not exist.
137
+
138
+ default value: `true`
139
+
140
+ * `fakecursor`: forces micro to render the cursor using terminal colors rather
141
+ than the actual terminal cursor. This is useful when the terminal's cursor is
142
+ slow or otherwise unavailable/undesirable to use.
143
+ Note: This option defaults to `true` in case `micro` is used in the legacy
144
+ Windows Console.
145
+
146
+ default value: `false`
147
+
148
+ * `fastdirty`: this determines what kind of algorithm micro uses to determine
149
+ if a buffer is modified or not. When `fastdirty` is on, micro just uses a
150
+ boolean `modified` that is set to `true` as soon as the user makes an edit.
151
+ This is fast, but can be inaccurate. If `fastdirty` is off, then micro will
152
+ hash the current buffer against a hash of the original file (created when
153
+ the buffer was loaded). This is more accurate but obviously more resource
154
+ intensive. This option will be automatically enabled for the current buffer
155
+ if the file size exceeds 50KB.
156
+
157
+ default value: `false`
158
+
159
+ * `fileformat`: this determines what kind of line endings micro will use for
160
+ the file. Unix line endings are just `\n` (linefeed) whereas dos line
161
+ endings are `\r\n` (carriage return + linefeed). The two possible values for
162
+ this option are `unix` and `dos`. The fileformat will be automatically
163
+ detected (when you open an existing file) and displayed on the statusline,
164
+ but this option is useful if you would like to change the line endings or if
165
+ you are starting a new file. Changing this option while editing a file will
166
+ change its line endings. Opening a file with this option set will only have
167
+ an effect if the file is empty/newly created, because otherwise the fileformat
168
+ will be automatically detected from the existing line endings.
169
+
170
+ default value: `unix` on Unix systems, `dos` on Windows
171
+
172
+ * `filetype`: sets the filetype for the current buffer. Set this option to
173
+ `off` to completely disable filetype detection.
174
+
175
+ default value: `unknown`. This will be automatically overridden depending
176
+ on the file you open.
177
+
178
+ * `helpsplit`: sets the split type to be used by the `help` command.
179
+ Possible values:
180
+ * `vsplit`: open help in a vertical split pane
181
+ * `hsplit`: open help in a horizontal split pane
182
+
183
+ default value: `hsplit`
184
+
185
+ * `hlsearch`: highlight all instances of the searched text after a successful
186
+ search. This highlighting can be temporarily turned off via the
187
+ `UnhighlightSearch` action (triggered by the Esc key by default) or toggled
188
+ on/off via the `ToggleHighlightSearch` action. Note that these actions don't
189
+ change the `hlsearch` setting. As long as `hlsearch` is set to true, the next
190
+ search will have the highlighting turned on again.
191
+
192
+ default value: `false`
193
+
194
+ * `hltaberrors`: highlight tabs when spaces are expected, and spaces when tabs
195
+ are expected. More precisely: if `tabstospaces` option is on, highlight
196
+ all tab characters; if `tabstospaces` is off, highlight space characters
197
+ in the initial indent part of the line.
198
+
199
+ default value: `false`
200
+
201
+ * `hltrailingws`: highlight trailing whitespaces at ends of lines. Note that
202
+ it doesn't highlight newly added trailing whitespaces that naturally occur
203
+ while typing text. It highlights only nasty forgotten trailing whitespaces.
204
+
205
+ default value: `false`
206
+
207
+ * `ignorecase`: perform case-insensitive searches.
208
+
209
+ default value: `true`
210
+
211
+ * `incsearch`: enable incremental search in "Find" prompt (matching as you type).
212
+
213
+ default value: `true`
214
+
215
+ * `indentchar`: sets the character to be shown to display tab characters.
216
+ This option is **deprecated**, use the `tab` key in `showchars` option instead.
217
+
218
+ default value: ` ` (space)
219
+
220
+ * `infobar`: enables the line at the bottom of the editor where messages are
221
+ printed. This option is `global only`.
222
+
223
+ default value: `true`
224
+
225
+ * `keepautoindent`: when using autoindent, whitespace is added for you. This
226
+ option determines if when you move to the next line without any insertions
227
+ the whitespace that was added should be deleted to remove trailing
228
+ whitespace. By default, the autoindent whitespace is deleted if the line
229
+ was left empty.
230
+
231
+ default value: `false`
232
+
233
+ * `keymenu`: display the nano-style key menu at the bottom of the screen. Note
234
+ that ToggleKeyMenu is bound to `Alt-g` by default and this is displayed in
235
+ the statusline. To disable the key binding, bind `Alt-g` to `None`.
236
+
237
+ default value: `false`
238
+
239
+ * `lockbindings`: prevent plugins and lua scripts from binding any keys.
240
+ Any custom actions must be binded manually either via commands like `bind`
241
+ or by modifying the `bindings.json` file.
242
+
243
+ default value: `false`
244
+
245
+ * `matchbrace`: show matching braces for '()', '{}', '[]' when the cursor
246
+ is on a brace character or (if `matchbraceleft` is enabled) next to it.
247
+
248
+ default value: `true`
249
+
250
+ * `matchbraceleft`: simulate I-beam cursor behavior (cursor located not on a
251
+ character but "between" characters): when showing matching braces, if there
252
+ is no brace character directly under the cursor, match the brace character
253
+ to the left of the cursor instead. Also when jumping to the matching brace,
254
+ move the cursor either to the matching brace character or to the character
255
+ next to it, depending on whether the initial cursor position was on the
256
+ brace character or next to it (i.e. "inside" or "outside" the braces).
257
+ With `matchbraceleft` disabled, micro will only match the brace directly
258
+ under the cursor and will only jump to precisely to the matching brace.
259
+
260
+ default value: `true`
261
+
262
+ * `matchbracestyle`: whether to underline or highlight matching braces when
263
+ `matchbrace` is enabled. The color of highlight is determined by the `match-brace`
264
+ field in the current theme. Possible values:
265
+ * `underline`: underline matching braces.
266
+ * `highlight`: use `match-brace` style from the current theme.
267
+
268
+ default value: `underline`
269
+
270
+ * `mkparents`: if a file is opened on a path that does not exist, the file
271
+ cannot be saved because the parent directories don't exist. This option lets
272
+ micro automatically create the parent directories in such a situation.
273
+
274
+ default value: `false`
275
+
276
+ * `mouse`: mouse support. When mouse support is disabled,
277
+ usually the terminal will be able to access mouse events which can be useful
278
+ if you want to copy from the terminal instead of from micro (if over ssh for
279
+ example, because the terminal has access to the local clipboard and micro
280
+ does not).
281
+
282
+ default value: `true`
283
+
284
+ * `multiopen`: specifies how to layout multiple files opened at startup.
285
+ Most useful as a command-line option, like `-multiopen vsplit`. Possible
286
+ values correspond to commands (see `> help commands`) that open files:
287
+ * `tab`: open each file in a separate tab.
288
+ * `vsplit`: open files side-by-side.
289
+ * `hsplit`: open files stacked top to bottom.
290
+
291
+ default value: `tab`
292
+
293
+ * `pageoverlap`: the number of lines from the current view to keep in view
294
+ when paging up or down. If this is set to 2, for instance, and you page
295
+ down, the last two lines of the previous page will be the first two lines
296
+ of the next page.
297
+
298
+ default value: `2`
299
+
300
+ * `parsecursor`: if enabled, this will cause micro to parse filenames such as
301
+ `file.txt:10:5` as requesting to open `file.txt` with the cursor at line 10
302
+ and column 5. The column number can also be dropped to open the file at a
303
+ given line and column 0. Note that with this option enabled it is not possible
304
+ to open a file such as `file.txt:10:5`, where `:10:5` is part of the filename.
305
+ It is also possible to open a file with a certain cursor location by using the
306
+ `+LINE:COL` flag syntax. See `micro -help` for the command line options.
307
+
308
+ default value: `false`
309
+
310
+ * `paste`: treat characters sent from the terminal in a single chunk as a paste
311
+ event rather than a series of manual key presses. If you are pasting using
312
+ the terminal keybinding (not `Ctrl-v`, which is micro's default paste
313
+ keybinding) then it is a good idea to enable this option during the paste
314
+ and disable once the paste is over. See `> help copypaste` for details about
315
+ copying and pasting in a terminal environment.
316
+
317
+ default value: `false`
318
+
319
+ * `permbackup`: this option causes backups (see `backup` option) to be
320
+ permanently saved. With permanent backups, micro will not remove backups when
321
+ files are closed and will never apply them to existing files. Use this option
322
+ if you are interested in manually managing your backup files.
323
+
324
+ default value: `false`
325
+
326
+ * `pluginchannels`: list of URLs pointing to plugin channels for downloading and
327
+ installing plugins. A plugin channel consists of a json file with links to
328
+ plugin repos, which store information about plugin versions and download URLs.
329
+ By default, this option points to the official plugin channel hosted on GitHub
330
+ at https://github.com/micro-editor/plugin-channel.
331
+
332
+ default value: `[https://raw.githubusercontent.com/micro-editor/plugin-channel/master/channel.json]`
333
+
334
+ * `pluginrepos`: a list of links to plugin repositories.
335
+
336
+ default value: `[]` (empty list)
337
+
338
+ * `readonly`: when enabled, disallows edits to the buffer. It is recommended
339
+ to only ever set this option locally using `setlocal`.
340
+
341
+ default value: `false`
342
+
343
+ * `relativeruler`: make line numbers display relatively. If set to true, all
344
+ lines except for the line that the cursor is located will display the distance
345
+ from the cursor's line.
346
+
347
+ default value: `false`
348
+
349
+ * `reload`: controls the reload behavior of the current buffer in case the file
350
+ has changed. The available options are `prompt`, `auto` & `disabled`.
351
+
352
+ default value: `prompt`
353
+
354
+ * `rmtrailingws`: micro will automatically trim trailing whitespaces at ends of
355
+ lines.
356
+ Note: This setting overrides `keepautoindent` and isn't used at timed `autosave`
357
+ or forced `autosave` in case the buffer didn't change. A manual save will
358
+ involve the action regardless if the buffer has been changed or not.
359
+
360
+ default value: `false`
361
+
362
+ * `ruler`: display line numbers.
363
+
364
+ default value: `true`
365
+
366
+ * `savecursor`: remember where the cursor was last time the file was opened and
367
+ put it there when you open the file again. Information is saved to
368
+ `~/.config/micro/buffers/`
369
+
370
+ default value: `false`
371
+
372
+ * `savehistory`: remember command history between closing and re-opening
373
+ micro. Information is saved to `~/.config/micro/buffers/history`.
374
+
375
+ default value: `true`
376
+
377
+ * `saveundo`: when this option is on, undo is saved even after you close a file
378
+ so if you close and reopen a file, you can keep undoing. Information is
379
+ saved to `~/.config/micro/buffers/`.
380
+
381
+ default value: `false`
382
+
383
+ * `scrollbar`: display a scroll bar
384
+
385
+ default value: `false`
386
+
387
+ * `scrollbarchar`: specifies the character used for displaying the scrollbar
388
+
389
+ default value: `|`
390
+
391
+ * `scrollmargin`: margin at which the view starts scrolling when the cursor
392
+ approaches the edge of the view.
393
+
394
+ default value: `3`
395
+
396
+ * `scrollspeed`: amount of lines to scroll for one scroll event.
397
+
398
+ default value: `2`
399
+
400
+ * `showchars`: sets what characters to be shown to display various invisible
401
+ characters in the file. The characters shown will not be inserted into files.
402
+ This option is specified in the form of `key1=value1,key2=value2,...`.
403
+
404
+ Here are the list of keys:
405
+ - `space`: space characters
406
+ - `tab`: tab characters. If set, overrides the `indentchar` option.
407
+ - `ispace`: space characters at indent position before the first visible
408
+ character in a line. If this is not set, `space` will be shown
409
+ instead.
410
+ - `itab`: tab characters before the first visible character in a line.
411
+ If this is not set, `tab` will be shown instead.
412
+
413
+ Only `tab` and `itab` can display multiple characters (if possible),
414
+ otherwise only the first character will be displayed.
415
+
416
+ An example of this option value could be `tab=>,space=.,itab=|>,ispace=|`
417
+
418
+ The color of the shown character is determined by the `indent-char`
419
+ field in the current theme rather than the default text color.
420
+
421
+ default value: `""` (empty string)
422
+
423
+ * `smartpaste`: add leading whitespace when pasting multiple lines.
424
+ This will attempt to preserve the current indentation level when pasting an
425
+ unindented block.
426
+
427
+ default value: `true`
428
+
429
+ * `softwrap`: wrap lines that are too long to fit on the screen.
430
+
431
+ default value: `false`
432
+
433
+ * `splitbottom`: when a horizontal split is created, create it below the
434
+ current split.
435
+
436
+ default value: `true`
437
+
438
+ * `splitright`: when a vertical split is created, create it to the right of the
439
+ current split.
440
+
441
+ default value: `true`
442
+
443
+ * `statusformatl`: format string definition for the left-justified part of the
444
+ statusline. Special directives should be placed inside `$()`. Special
445
+ directives include: `filename`, `modified`, `line`, `col`, `lines`,
446
+ `percentage`, `opt`, `overwrite`, `bind`.
447
+ The `opt` and `bind` directives take either an option or an action afterward
448
+ and fill in the value of the option or the key bound to the action.
449
+
450
+ default value: `$(filename) $(modified)$(overwrite)($(line),$(col)) $(status.paste)|
451
+ ft:$(opt:filetype) | $(opt:fileformat) | $(opt:encoding)`
452
+
453
+ * `statusformatr`: format string definition for the right-justified part of the
454
+ statusline.
455
+
456
+ default value: `$(bind:ToggleKeyMenu): bindings, $(bind:ToggleHelp): help`
457
+
458
+ * `statusline`: display the status line at the bottom of the screen.
459
+
460
+ default value: `true`
461
+
462
+ * `sucmd`: specifies the super user command. On most systems this is "sudo" but
463
+ on BSD it can be "doas." This option can be customized and is only used when
464
+ saving with su.
465
+
466
+ default value: `sudo`
467
+
468
+ * `syntax`: enables syntax highlighting.
469
+
470
+ default value: `true`
471
+
472
+ * `tabhighlight`: inverts the tab characters' (filename, save indicator, etc)
473
+ colors with respect to the tab bar.
474
+
475
+ default value: `false`
476
+
477
+ * `tabmovement`: navigate spaces at the beginning of lines as if they are tabs
478
+ (e.g. move over 4 spaces at once). This option only does anything if
479
+ `tabstospaces` is on.
480
+
481
+ default value: `false`
482
+
483
+ * `tabreverse`: reverses the tab bar colors when active.
484
+
485
+ default value: `true`
486
+
487
+ * `tabsize`: the size in spaces that a tab character should be displayed with.
488
+
489
+ default value: `4`
490
+
491
+ * `tabstospaces`: use spaces instead of tabs. Note: This option will be
492
+ overridden by [the `ftoptions` plugin](https://github.com/micro-editor/micro/blob/master/runtime/plugins/ftoptions/ftoptions.lua)
493
+ for certain filetypes. To disable this behavior, add `"ftoptions": false` to
494
+ your config. See [issue #2213](https://github.com/micro-editor/micro/issues/2213)
495
+ for more details.
496
+
497
+ default value: `false`
498
+
499
+ * `truecolor`: controls whether micro will use true colors (24-bit colors) when
500
+ using a colorscheme with true colors, such as `solarized-tc` or `atom-dark`.
501
+ * `auto`: enable usage of true color if micro detects that it is supported by
502
+ the terminal, otherwise disable it.
503
+ * `on`: force usage of true color even if micro does not detect its support
504
+ by the terminal (of course this is not guaranteed to work well unless the
505
+ terminal actually supports true color).
506
+ * `off`: disable true color usage.
507
+
508
+ Note: The change will take effect after the next start of `micro`.
509
+
510
+ default value: `auto`
511
+
512
+ * `useprimary` (only useful on unix): defines whether or not micro will use the
513
+ primary clipboard to copy selections in the background. This does not affect
514
+ the normal clipboard using `Ctrl-c` and `Ctrl-v`.
515
+
516
+ default value: `true`
517
+
518
+ * `wordwrap`: wrap long lines by words, i.e. break at spaces. This option
519
+ only does anything if `softwrap` is on.
520
+
521
+ default value: `false`
522
+
523
+ * `xterm`: micro will assume that the terminal it is running in conforms to
524
+ `xterm-256color` regardless of what the `$TERM` variable actually contains.
525
+ Enabling this option may cause unwanted effects if your terminal in fact
526
+ does not conform to the `xterm-256color` standard.
527
+
528
+ default value: `false`
529
+
530
+ ---
531
+
532
+ Plugin options: all plugins come with a special option to enable or disable
533
+ them. The option is a boolean with the same name as the plugin itself.
534
+
535
+ By default, the following plugins are provided, each with an option to enable
536
+ or disable them:
537
+
538
+ * `autoclose`: automatically closes brackets, quotes, etc...
539
+ * `comment`: provides automatic commenting for a number of languages
540
+ * `ftoptions`: alters some default options depending on the filetype
541
+ * `linter`: provides extensible linting for many languages
542
+ * `literate`: provides advanced syntax highlighting for the Literate
543
+ programming tool.
544
+ * `status`: provides some extensions to the status line (integration with
545
+ Git and more).
546
+ * `diff`: integrates the `diffgutter` option with Git. If you are in a Git
547
+ directory, the diff gutter will show changes with respect to the most
548
+ recent Git commit rather than the diff since opening the file.
549
+
550
+ Any option you set in the editor will be saved to the file
551
+ `~/.config/micro/settings.json` so, in effect, your configuration file will be
552
+ created for you. If you'd like to take your configuration with you to another
553
+ machine, simply copy the `settings.json` to the other machine.
554
+
555
+ ## Settings.json file
556
+
557
+ The `settings.json` file should go in your configuration directory (by default
558
+ at `~/.config/micro`), and should contain only options which have been modified
559
+ from their default setting. Here is the full list of options in json format,
560
+ so that you can see what the formatting should look like.
561
+
562
+ ```json
563
+ {
564
+ "autoclose": true,
565
+ "autoindent": true,
566
+ "autosave": 0,
567
+ "autosu": false,
568
+ "backup": true,
569
+ "backupdir": "",
570
+ "basename": false,
571
+ "clipboard": "external",
572
+ "colorcolumn": 0,
573
+ "colorscheme": "default",
574
+ "comment": true,
575
+ "cursorline": true,
576
+ "cursorshape": "block",
577
+ "detectlimit": 100,
578
+ "diff": true,
579
+ "diffgutter": false,
580
+ "divchars": "|-",
581
+ "divreverse": true,
582
+ "encoding": "utf-8",
583
+ "eofnewline": true,
584
+ "fakecursor": false,
585
+ "fastdirty": false,
586
+ "fileformat": "unix",
587
+ "filetype": "unknown",
588
+ "ftoptions": true,
589
+ "helpsplit": "hsplit",
590
+ "hlsearch": false,
591
+ "hltaberrors": false,
592
+ "hltrailingws": false,
593
+ "ignorecase": true,
594
+ "incsearch": true,
595
+ "indentchar": " ",
596
+ "infobar": true,
597
+ "initlua": true,
598
+ "keepautoindent": false,
599
+ "keymenu": false,
600
+ "linter": true,
601
+ "literate": true,
602
+ "matchbrace": true,
603
+ "matchbraceleft": true,
604
+ "matchbracestyle": "underline",
605
+ "mkparents": false,
606
+ "mouse": true,
607
+ "multiopen": "tab",
608
+ "pageoverlap": 2,
609
+ "parsecursor": false,
610
+ "paste": false,
611
+ "permbackup": false,
612
+ "pluginchannels": [
613
+ "https://raw.githubusercontent.com/micro-editor/plugin-channel/master/channel.json"
614
+ ],
615
+ "pluginrepos": [],
616
+ "readonly": false,
617
+ "relativeruler": false,
618
+ "reload": "prompt",
619
+ "rmtrailingws": false,
620
+ "ruler": true,
621
+ "savecursor": false,
622
+ "savehistory": true,
623
+ "saveundo": false,
624
+ "scrollbar": false,
625
+ "scrollbarchar": "|",
626
+ "scrollmargin": 3,
627
+ "scrollspeed": 2,
628
+ "showchars": "",
629
+ "smartpaste": true,
630
+ "softwrap": false,
631
+ "splitbottom": true,
632
+ "splitright": true,
633
+ "status": true,
634
+ "statusformatl": "$(filename) $(modified)$(overwrite)($(line),$(col)) $(status.paste)| ft:$(opt:filetype) | $(opt:fileformat) | $(opt:encoding)",
635
+ "statusformatr": "$(bind:ToggleKeyMenu): bindings, $(bind:ToggleHelp): help",
636
+ "statusline": true,
637
+ "sucmd": "sudo",
638
+ "syntax": true,
639
+ "tabhighlight": true,
640
+ "tabmovement": false,
641
+ "tabreverse": false,
642
+ "tabsize": 4,
643
+ "tabstospaces": false,
644
+ "useprimary": true,
645
+ "wordwrap": false,
646
+ "xterm": false
647
+ }
648
+ ```
649
+
650
+ ## Global and local settings
651
+
652
+ You can set these settings either globally or locally. Locally means that the
653
+ setting won't be saved to `~/.config/micro/settings.json` and that it will only
654
+ be set in the current buffer. Setting an option globally is the default, and
655
+ will set the option in all buffers. Use the `setlocal` command to set an option
656
+ locally rather than globally.
657
+
658
+ The `colorscheme` option is global only, and the `filetype` option is local
659
+ only. To set an option locally, use `setlocal` instead of `set`.
660
+
661
+ In the `settings.json` file you can also put set options locally by specifying
662
+ either a glob or a filetype. Here is an example which has `tabstospaces` on for
663
+ all files except Go files, and `tabsize` 4 for all files except Ruby files:
664
+
665
+ ```json
666
+ {
667
+ "ft:go": {
668
+ "tabstospaces": false
669
+ },
670
+ "ft:ruby": {
671
+ "tabsize": 2
672
+ },
673
+ "tabstospaces": true,
674
+ "tabsize": 4
675
+ }
676
+ ```
677
+
678
+ Or similarly you can match with globs:
679
+
680
+ ```json
681
+ {
682
+ "glob:*.go": {
683
+ "tabstospaces": false
684
+ },
685
+ "glob:*.rb": {
686
+ "tabsize": 2
687
+ },
688
+ "tabstospaces": true,
689
+ "tabsize": 4
690
+ }
691
+ ```
692
+
693
+ You can also omit the `glob:` prefix before globs:
694
+
695
+ ```json
696
+ {
697
+ "*.go": {
698
+ "tabstospaces": false
699
+ },
700
+ "*.rb": {
701
+ "tabsize": 2
702
+ },
703
+ "tabstospaces": true,
704
+ "tabsize": 4
705
+ }
706
+ ```
707
+
708
+ But it is generally more recommended to use the `glob:` prefix, as it avoids
709
+ potential conflicts with option names.