This commit is contained in:
Zachary Yedidia
2022-01-06 18:11:15 -08:00
5 changed files with 39 additions and 22 deletions

View File

@@ -262,6 +262,8 @@ view the help files here:
I also recommend reading the [tutorial](https://github.com/zyedidia/micro/tree/master/runtime/help/tutorial.md) for
a brief introduction to the more powerful configuration features micro offers.
There is also an unofficial Discord, which you can join at https://discord.gg/nhWR6armnR.
## Contributing
If you find any bugs, please report them! I am also happy to accept pull requests from anyone.
@@ -269,6 +271,6 @@ If you find any bugs, please report them! I am also happy to accept pull request
You can use the [GitHub issue tracker](https://github.com/zyedidia/micro/issues)
to report bugs, ask questions, or suggest new features.
For a more informal setting to discuss the editor, you can join the [Gitter chat](https://gitter.im/zyedidia/micro).
For a more informal setting to discuss the editor, you can join the [Gitter chat](https://gitter.im/zyedidia/micro) or the [Discord](https://discord.gg/nhWR6armnR).
Sometimes I am unresponsive, and I apologize! If that happens, please ping me.

View File

@@ -14,8 +14,8 @@ at the end of this document).
If `~/.config/micro/bindings.json` does not exist, you can simply create it.
Micro will know what to do with it.
You can use the alt keys + arrows to move word by word. Ctrl left and right
move the cursor to the start and end of the line, and ctrl up and down move the
You can use Ctrl + arrows to move word by word (Alt + arrows for Mac). Alt + left and right
move the cursor to the start and end of the line (Ctrl + left/right for Mac), and Ctrl + up and down move the
cursor the start and end of the buffer.
You can hold shift with all of these movement actions to select while moving.
@@ -70,7 +70,7 @@ will execute `InsertTab`.
## Binding commands
You can also bind a key to execute a command in command mode (see
You can also bind a key to execute a command in command mode (see
`help commands`). Simply prepend the binding with `command:`. For example:
```json
@@ -88,9 +88,9 @@ instead insert unicode characters. To fix this, do the following:
Now when you press `Alt-p` the `pwd` command will be executed which will show
your working directory in the infobar.
You can also bind an "editable" command with `command-edit:`. This means that
You can also bind an "editable" command with `command-edit:`. This means that
micro won't immediately execute the command when you press the binding, but
instead just place the string in the infobar in command mode. For example,
instead just place the string in the infobar in command mode. For example,
you could rebind `Ctrl-g` to `> help`:
```json
@@ -105,13 +105,13 @@ cursor placement).
## Binding raw escape sequences
Only read this section if you are interested in binding keys that aren't on the
Only read this section if you are interested in binding keys that aren't on the
list of supported keys for binding.
One of the drawbacks of using a terminal-based editor is that the editor must
get all of its information about key events through the terminal. The terminal
sends these events in the form of escape sequences often (but not always)
starting with `0x1b`.
starting with `0x1b`.
For example, if micro reads `\x1b[1;5D`, on most terminals this will mean the
user pressed CtrlLeft.
@@ -149,7 +149,7 @@ Coming soon!
## Unbinding keys
It is also possible to disable any of the default key bindings by use of the
It is also possible to disable any of the default key bindings by use of the
`None` action in the user's `bindings.json` file.
## Bindable actions and bindable keys
@@ -642,7 +642,7 @@ Note: On some old terminal emulators and on Windows machines, `Ctrl-h` should be
used for backspace.
Additionally, alt keys can be bound by using `Alt-key`. For example `Alt-a` or
`Alt-Up`. Micro supports an optional `-` between modifiers like `Alt` and
`Alt-Up`. Micro supports an optional `-` between modifiers like `Alt` and
`Ctrl` so `Alt-a` could be rewritten as `Alta` (case matters for alt bindings).
This is why in the default keybindings you can see `AltShiftLeft` instead of
`Alt-ShiftLeft` (they are equivalent).

View File

@@ -3,9 +3,9 @@
Micro supports creating plugins with a simple Lua system. Plugins are
folders containing Lua files and possibly other source files placed
in `~/.config/micro/plug`. The plugin directory (within `plug`) should
contain at least one Lua file and an `info.json` file. The info file
contain at least one Lua file and a `repo.json` file. The `repo.json` file
provides additional information such as the name of the plugin, the
plugin's website, dependencies, etc... Here is an example info file
plugin's website, dependencies, etc... [Here is an example `repo.json` file](https://github.com/micro-editor/updated-plugins/blob/master/go-plugin/repo.json)
from the go plugin, which has the following file structure:
```
@@ -17,7 +17,7 @@ from the go plugin, which has the following file structure:
```
The `go.lua` file contains the main code for the plugin, though the
code may be distributed across multiple Lua files. The `info.json`
code may be distributed across multiple Lua files. The `repo.json`
file contains information about the plugin such as the website,
description, version, and any requirements. Plugins may also
have additional files which can be added to micro's runtime files,

View File

@@ -18,7 +18,7 @@ rules:
- constant.number: "\\b0[bB][01][01_]+\\b"
- constant.number: "\\b[0-9_]((\\.?)[0-9_]+)?[eE][+\\-][0-9][0-9_]+\\b"
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
- comment: "[[:space:]]*[^\\\\]#.*$"
- comment: "[[:space:]]*(?:[^\\\\]|^)#.*$"
- comment:
start: "\\#\\["
end: "\\]\\#"

View File

@@ -1,27 +1,42 @@
filetype: raku
detect:
detect:
filename: "(\\.p6$|\\.pl6$|\\.pm6$|\\.raku$|\\.rakumod$|\\.rakudoc$)"
rules:
- type: "\\b(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)\\b"
- statement: "\\b(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\\b"
- special: "\\b(has|is|class|role|given|when|BUILD|multi|returns|method|submethod|slurp|say|sub)\\b"
- identifier:
start: "[$@%]"
end: "( |\\\\W|-)"
rules: []
- constant.string: "\".*\"|qq\\|.*\\|"
- default: "[sm]/.*/"
- identifier: "[$@%&](\\.|!|\\^)?([[:alpha:]]|_)"
- identifier: "[$@%&](\\.|!|^)?([[:alpha:]]|_)([[:alnum:]]|-|_)*([[:alnum:]]|_)"
- identifier: "[$@%&](\\?|\\*)([A-Z])([A-Z]|-)*([A-Z])"
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- preproc:
start: "(^use| = new)"
end: ";"
rules: []
- comment: "#.*"
- identifier.macro:
start: "<<EOSQL"
end: "EOSQL"
rules: []
- comment:
start: "#"
end: "$"
rules: []