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