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.
- package/LICENSE +22 -0
- package/PORTING.md +34 -0
- package/README.md +153 -0
- package/bmi +5 -0
- package/bun.lock +17 -0
- package/bunmicro +5 -0
- package/hlw.md +5 -0
- package/package.json +18 -0
- package/runtime/colorschemes/atom-dark.micro +33 -0
- package/runtime/colorschemes/bubblegum.micro +31 -0
- package/runtime/colorschemes/cmc-16.micro +47 -0
- package/runtime/colorschemes/cmc-tc.micro +43 -0
- package/runtime/colorschemes/darcula.micro +34 -0
- package/runtime/colorschemes/default.micro +1 -0
- package/runtime/colorschemes/dracula-tc.micro +49 -0
- package/runtime/colorschemes/dukedark-tc.micro +38 -0
- package/runtime/colorschemes/dukelight-tc.micro +38 -0
- package/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
- package/runtime/colorschemes/geany.micro +29 -0
- package/runtime/colorschemes/gotham.micro +29 -0
- package/runtime/colorschemes/gruvbox-tc.micro +29 -0
- package/runtime/colorschemes/gruvbox.micro +26 -0
- package/runtime/colorschemes/material-tc.micro +36 -0
- package/runtime/colorschemes/monokai-dark.micro +28 -0
- package/runtime/colorschemes/monokai.micro +34 -0
- package/runtime/colorschemes/one-dark.micro +39 -0
- package/runtime/colorschemes/railscast.micro +37 -0
- package/runtime/colorschemes/simple.micro +33 -0
- package/runtime/colorschemes/solarized-tc.micro +31 -0
- package/runtime/colorschemes/solarized.micro +30 -0
- package/runtime/colorschemes/sunny-day.micro +29 -0
- package/runtime/colorschemes/twilight.micro +40 -0
- package/runtime/colorschemes/zenburn.micro +30 -0
- package/runtime/help/actions.md +161 -0
- package/runtime/help/colors.md +421 -0
- package/runtime/help/commands.md +161 -0
- package/runtime/help/copypaste.md +149 -0
- package/runtime/help/defaultkeys.md +141 -0
- package/runtime/help/help.md +63 -0
- package/runtime/help/keybindings.md +760 -0
- package/runtime/help/linter.md +90 -0
- package/runtime/help/options.md +701 -0
- package/runtime/help/plugins.md +544 -0
- package/runtime/help/tutorial.md +112 -0
- package/runtime/jsplugins/chapter/chapter.js +108 -0
- package/runtime/jsplugins/diff/diff.js +46 -0
- package/runtime/jsplugins/example/example.js +108 -0
- package/runtime/jsplugins/linter/linter.js +281 -0
- package/runtime/plugins/autoclose/autoclose.lua +75 -0
- package/runtime/plugins/ftoptions/ftoptions.lua +17 -0
- package/runtime/plugins/literate/README.md +5 -0
- package/runtime/plugins/literate/literate.lua +55 -0
- package/runtime/plugins/status/help/status.md +21 -0
- package/runtime/plugins/status/status.lua +62 -0
- package/runtime/syntax/LICENSE +22 -0
- package/runtime/syntax/PowerShell.yaml +128 -0
- package/runtime/syntax/README.md +63 -0
- package/runtime/syntax/ada.yaml +43 -0
- package/runtime/syntax/apacheconf.yaml +59 -0
- package/runtime/syntax/arduino.yaml +101 -0
- package/runtime/syntax/asciidoc.yaml +51 -0
- package/runtime/syntax/asm.yaml +123 -0
- package/runtime/syntax/ats.yaml +99 -0
- package/runtime/syntax/awk.yaml +44 -0
- package/runtime/syntax/b.yaml +87 -0
- package/runtime/syntax/bat.yaml +57 -0
- package/runtime/syntax/c.yaml +60 -0
- package/runtime/syntax/caddyfile.yaml +23 -0
- package/runtime/syntax/cake.yaml +7 -0
- package/runtime/syntax/clojure.yaml +38 -0
- package/runtime/syntax/cmake.yaml +42 -0
- package/runtime/syntax/coffeescript.yaml +56 -0
- package/runtime/syntax/colortest.yaml +19 -0
- package/runtime/syntax/conky.yaml +17 -0
- package/runtime/syntax/cpp.yaml +91 -0
- package/runtime/syntax/crontab.yaml +36 -0
- package/runtime/syntax/crystal.yaml +72 -0
- package/runtime/syntax/csharp.yaml +52 -0
- package/runtime/syntax/css.yaml +44 -0
- package/runtime/syntax/csx.yaml +8 -0
- package/runtime/syntax/cuda.yaml +68 -0
- package/runtime/syntax/cython.yaml +52 -0
- package/runtime/syntax/d.yaml +121 -0
- package/runtime/syntax/dart.yaml +46 -0
- package/runtime/syntax/default.yaml +10 -0
- package/runtime/syntax/dockerfile.yaml +36 -0
- package/runtime/syntax/dot.yaml +29 -0
- package/runtime/syntax/elixir.yaml +30 -0
- package/runtime/syntax/elm.yaml +38 -0
- package/runtime/syntax/erb.yaml +42 -0
- package/runtime/syntax/erlang.yaml +45 -0
- package/runtime/syntax/fish.yaml +48 -0
- package/runtime/syntax/forth.yaml +34 -0
- package/runtime/syntax/fortran.yaml +64 -0
- package/runtime/syntax/freebsd-kernel.yaml +14 -0
- package/runtime/syntax/fsharp.yaml +48 -0
- package/runtime/syntax/gdscript.yaml +61 -0
- package/runtime/syntax/gemini.yaml +19 -0
- package/runtime/syntax/gentoo-ebuild.yaml +48 -0
- package/runtime/syntax/gentoo-etc-portage.yaml +23 -0
- package/runtime/syntax/git-commit.yaml +35 -0
- package/runtime/syntax/git-config.yaml +14 -0
- package/runtime/syntax/git-rebase-todo.yaml +19 -0
- package/runtime/syntax/gleam.yaml +69 -0
- package/runtime/syntax/glsl.yaml +26 -0
- package/runtime/syntax/gnuplot.yaml +15 -0
- package/runtime/syntax/go.yaml +62 -0
- package/runtime/syntax/godoc.yaml +17 -0
- package/runtime/syntax/golo.yaml +73 -0
- package/runtime/syntax/gomod.yaml +31 -0
- package/runtime/syntax/graphql.yaml +47 -0
- package/runtime/syntax/groff.yaml +30 -0
- package/runtime/syntax/groovy.yaml +111 -0
- package/runtime/syntax/haml.yaml +16 -0
- package/runtime/syntax/hare.yaml +52 -0
- package/runtime/syntax/haskell.yaml +52 -0
- package/runtime/syntax/hc.yaml +52 -0
- package/runtime/syntax/html.yaml +70 -0
- package/runtime/syntax/html4.yaml +25 -0
- package/runtime/syntax/html5.yaml +25 -0
- package/runtime/syntax/ini.yaml +23 -0
- package/runtime/syntax/inputrc.yaml +14 -0
- package/runtime/syntax/java.yaml +37 -0
- package/runtime/syntax/javascript.yaml +76 -0
- package/runtime/syntax/jinja2.yaml +19 -0
- package/runtime/syntax/json.yaml +39 -0
- package/runtime/syntax/jsonnet.yaml +92 -0
- package/runtime/syntax/julia.yaml +57 -0
- package/runtime/syntax/justfile.yaml +40 -0
- package/runtime/syntax/keymap.yaml +27 -0
- package/runtime/syntax/kickstart.yaml +16 -0
- package/runtime/syntax/kotlin.yaml +66 -0
- package/runtime/syntax/kvlang.yaml +67 -0
- package/runtime/syntax/ledger.yaml +14 -0
- package/runtime/syntax/lfe.yaml +17 -0
- package/runtime/syntax/lilypond.yaml +26 -0
- package/runtime/syntax/lisp.yaml +17 -0
- package/runtime/syntax/log.yaml +92 -0
- package/runtime/syntax/lua.yaml +111 -0
- package/runtime/syntax/mail.yaml +25 -0
- package/runtime/syntax/makefile.yaml +38 -0
- package/runtime/syntax/man.yaml +12 -0
- package/runtime/syntax/markdown.yaml +49 -0
- package/runtime/syntax/mc.yaml +23 -0
- package/runtime/syntax/meson.yaml +51 -0
- package/runtime/syntax/micro.yaml +34 -0
- package/runtime/syntax/mpdconf.yaml +13 -0
- package/runtime/syntax/msbuild.yaml +6 -0
- package/runtime/syntax/nanorc.yaml +16 -0
- package/runtime/syntax/nftables.yaml +30 -0
- package/runtime/syntax/nginx.yaml +22 -0
- package/runtime/syntax/nim.yaml +27 -0
- package/runtime/syntax/nix.yaml +32 -0
- package/runtime/syntax/nu.yaml +114 -0
- package/runtime/syntax/objc.yaml +60 -0
- package/runtime/syntax/ocaml.yaml +43 -0
- package/runtime/syntax/octave.yaml +83 -0
- package/runtime/syntax/odin.yaml +64 -0
- package/runtime/syntax/pascal.yaml +45 -0
- package/runtime/syntax/patch.yaml +14 -0
- package/runtime/syntax/peg.yaml +16 -0
- package/runtime/syntax/perl.yaml +58 -0
- package/runtime/syntax/php.yaml +60 -0
- package/runtime/syntax/pkg-config.yaml +12 -0
- package/runtime/syntax/po.yaml +12 -0
- package/runtime/syntax/pony.yaml +37 -0
- package/runtime/syntax/pov.yaml +21 -0
- package/runtime/syntax/privoxy-action.yaml +14 -0
- package/runtime/syntax/privoxy-config.yaml +10 -0
- package/runtime/syntax/privoxy-filter.yaml +12 -0
- package/runtime/syntax/proto.yaml +40 -0
- package/runtime/syntax/prql.yaml +84 -0
- package/runtime/syntax/puppet.yaml +22 -0
- package/runtime/syntax/python2.yaml +60 -0
- package/runtime/syntax/python3.yaml +62 -0
- package/runtime/syntax/r.yaml +32 -0
- package/runtime/syntax/raku.yaml +42 -0
- package/runtime/syntax/reST.yaml +18 -0
- package/runtime/syntax/renpy.yaml +15 -0
- package/runtime/syntax/rpmspec.yaml +43 -0
- package/runtime/syntax/ruby.yaml +73 -0
- package/runtime/syntax/rust.yaml +78 -0
- package/runtime/syntax/sage.yaml +60 -0
- package/runtime/syntax/scad.yaml +53 -0
- package/runtime/syntax/scala.yaml +33 -0
- package/runtime/syntax/sed.yaml +13 -0
- package/runtime/syntax/sh.yaml +69 -0
- package/runtime/syntax/sls.yaml +15 -0
- package/runtime/syntax/smalltalk.yaml +55 -0
- package/runtime/syntax/solidity.yaml +41 -0
- package/runtime/syntax/sql.yaml +35 -0
- package/runtime/syntax/stata.yaml +67 -0
- package/runtime/syntax/svelte.yaml +27 -0
- package/runtime/syntax/swift.yaml +103 -0
- package/runtime/syntax/systemd.yaml +16 -0
- package/runtime/syntax/tcl.yaml +18 -0
- package/runtime/syntax/terraform.yaml +87 -0
- package/runtime/syntax/tex.yaml +32 -0
- package/runtime/syntax/toml.yaml +56 -0
- package/runtime/syntax/twig.yaml +55 -0
- package/runtime/syntax/typescript.yaml +49 -0
- package/runtime/syntax/v.yaml +80 -0
- package/runtime/syntax/vala.yaml +26 -0
- package/runtime/syntax/verilog.yaml +60 -0
- package/runtime/syntax/vhdl.yaml +37 -0
- package/runtime/syntax/vi.yaml +31 -0
- package/runtime/syntax/vue.yaml +64 -0
- package/runtime/syntax/xml.yaml +37 -0
- package/runtime/syntax/xresources.yaml +14 -0
- package/runtime/syntax/yaml.yaml +34 -0
- package/runtime/syntax/yum.yaml +12 -0
- package/runtime/syntax/zig.yaml +52 -0
- package/runtime/syntax/zscript.yaml +72 -0
- package/runtime/syntax/zsh.yaml +52 -0
- package/src/buffer/buffer.js +126 -0
- package/src/buffer/loc.js +38 -0
- package/src/buffer/message.js +29 -0
- package/src/config/colorscheme.js +109 -0
- package/src/config/config.js +118 -0
- package/src/config/defaults.js +102 -0
- package/src/display/ansi-style.js +60 -0
- package/src/highlight/highlighter.js +237 -0
- package/src/highlight/parser.js +137 -0
- package/src/index.js +5942 -0
- package/src/lua/engine.js +38 -0
- package/src/platform/archive.js +50 -0
- package/src/platform/clipboard.js +160 -0
- package/src/platform/commands.js +140 -0
- package/src/plugins/js-bridge.js +902 -0
- package/src/plugins/manager.js +619 -0
- package/src/runtime/registry.js +89 -0
- package/src/screen/cell-buffer.js +81 -0
- package/src/screen/events.js +263 -0
- package/src/screen/screen.js +118 -0
- package/src/screen/vt100.js +391 -0
- package/src/shell/shell.js +70 -0
- package/todo.txt +359 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
Copy and paste are essential features in micro but can be
|
|
2
|
+
confusing to get right especially when running micro over SSH
|
|
3
|
+
because there are multiple methods. This help document will explain
|
|
4
|
+
the various methods for copying and pasting, how they work,
|
|
5
|
+
and the best methods for doing so over SSH.
|
|
6
|
+
|
|
7
|
+
# OSC 52 (terminal clipboard)
|
|
8
|
+
|
|
9
|
+
If possible, setting the `clipboard` option to `terminal` will give
|
|
10
|
+
best results because it will work over SSH and locally. However, there
|
|
11
|
+
is limited support among terminal emulators for the terminal clipboard
|
|
12
|
+
(which uses the OSC 52 protocol to communicate clipboard contents).
|
|
13
|
+
Here is a list of terminal emulators and their status:
|
|
14
|
+
|
|
15
|
+
* `Kitty`: supported, but only writing is enabled by default. To enable
|
|
16
|
+
reading, add `read-primary` and `read-clipboard` to the
|
|
17
|
+
`clipboard_control` option.
|
|
18
|
+
|
|
19
|
+
* `iTerm2`: only copying (writing to clipboard) is supported. Must be enabled in
|
|
20
|
+
`Preferences->General-> Selection->Applications in terminal may access clipboard`.
|
|
21
|
+
You can use `Command-v` to paste.
|
|
22
|
+
|
|
23
|
+
* `st`: supported.
|
|
24
|
+
|
|
25
|
+
* `rxvt-unicode`: not natively supported, but there is a Perl extension
|
|
26
|
+
[here](https://anti.teamidiot.de/static/nei/*/Code/urxvt/).
|
|
27
|
+
|
|
28
|
+
* `xterm`: supported, but disabled by default. It can be enabled by putting
|
|
29
|
+
the following in `.Xresources` or `.Xdefaults`:
|
|
30
|
+
`XTerm*disallowedWindowOps: 20,21,SetXprop`.
|
|
31
|
+
|
|
32
|
+
* `gnome-terminal`: does not support OSC 52.
|
|
33
|
+
|
|
34
|
+
* `alacritty`: supported. Since 0.13.0, reading has been disabled by default.
|
|
35
|
+
To reenable it, set the `terminal.osc52` option to `CopyPaste`.
|
|
36
|
+
|
|
37
|
+
* `foot`: supported.
|
|
38
|
+
|
|
39
|
+
* `wezterm`: only copying (writing to clipboard) is supported.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
**Summary:** If you want copy and paste to work over SSH, then you
|
|
43
|
+
should set `clipboard` to `terminal`, and make sure your terminal
|
|
44
|
+
supports OSC 52.
|
|
45
|
+
|
|
46
|
+
# Pasting
|
|
47
|
+
|
|
48
|
+
## Recommendations (TL;DR)
|
|
49
|
+
|
|
50
|
+
The recommended method of pasting is the following:
|
|
51
|
+
|
|
52
|
+
* If you are not working over SSH, use the micro keybinding (`Ctrl-v`
|
|
53
|
+
by default) to perform pastes. If on Linux, install `xclip` or
|
|
54
|
+
`xsel` beforehand.
|
|
55
|
+
|
|
56
|
+
* If you are working over SSH, use the terminal keybinding
|
|
57
|
+
(`Ctrl-Shift-v` or `Command-v`) to perform pastes. If your terminal
|
|
58
|
+
does not support bracketed paste, when performing a paste first
|
|
59
|
+
enable the `paste` option, and when finished disable the option.
|
|
60
|
+
|
|
61
|
+
## Micro paste events
|
|
62
|
+
|
|
63
|
+
Micro is an application that runs within the terminal. This means
|
|
64
|
+
that the terminal sends micro events, such as key events, mouse
|
|
65
|
+
events, resize events, and paste events. Micro's default keybinding
|
|
66
|
+
for paste is `Ctrl-v`. This means that when micro receives the key
|
|
67
|
+
event saying `Ctrl-v` has been pressed from the terminal, it will
|
|
68
|
+
attempt to access the system clipboard and effect a paste. The
|
|
69
|
+
system clipboard will be accessed through `pbpaste` on MacOS
|
|
70
|
+
(installed by default), `xclip` or `xsel` on Linux (these
|
|
71
|
+
applications must be installed by the user) or a system call on
|
|
72
|
+
Windows.
|
|
73
|
+
|
|
74
|
+
## Terminal paste events
|
|
75
|
+
|
|
76
|
+
For certain keypresses, the terminal will not send an event to
|
|
77
|
+
micro and will instead do something itself. In this document,
|
|
78
|
+
such keypresses will be called "terminal keybindings." Often
|
|
79
|
+
there will be a terminal keybinding for pasting and copying. On
|
|
80
|
+
MacOS these are Command-v and Command-c and on Linux `Ctrl-Shift-v`
|
|
81
|
+
and `Ctrl-Shift-c`. When the terminal keybinding for paste is
|
|
82
|
+
executed, your terminal will access the system clipboard, and send
|
|
83
|
+
micro either a paste event or a list of key events (one key for each
|
|
84
|
+
character in the paste), depending on whether or not your terminal
|
|
85
|
+
supports sending paste events (called bracketed paste).
|
|
86
|
+
|
|
87
|
+
If your terminal supports bracketed paste, then it will send a paste
|
|
88
|
+
event and everything will work well. However, if your terminal
|
|
89
|
+
sends a list of key events, this can cause issues because micro
|
|
90
|
+
will think you manually entered each character and may add closing
|
|
91
|
+
brackets or automatic indentation, which will mess up the pasted
|
|
92
|
+
text. To avoid this, you can temporarily enable the `paste` option
|
|
93
|
+
while you perform the paste. When paste option is on, micro will
|
|
94
|
+
aggregate lists of multiple key events into larger paste events.
|
|
95
|
+
It is a good idea to disable the `paste` option during normal use
|
|
96
|
+
as occasionally if you are typing quickly, the terminal will send
|
|
97
|
+
the key events as lists of characters that were in fact manually
|
|
98
|
+
entered.
|
|
99
|
+
|
|
100
|
+
## Pasting over SSH
|
|
101
|
+
|
|
102
|
+
When working over SSH, micro is running on the remote machine and
|
|
103
|
+
your terminal is running on your local machine. Therefore if you
|
|
104
|
+
would like to paste, using `Ctrl-v` (micro's keybinding) will not
|
|
105
|
+
work because when micro attempts to access the system clipboard,
|
|
106
|
+
it will access the remote machine's clipboard rather than the local
|
|
107
|
+
machine's clipboard. On the other hand, the terminal keybinding
|
|
108
|
+
for paste will access your local clipboard and send the text over
|
|
109
|
+
the network as a paste event, which is what you want.
|
|
110
|
+
|
|
111
|
+
# Copying
|
|
112
|
+
|
|
113
|
+
# Recommendations (TL;DR)
|
|
114
|
+
|
|
115
|
+
The recommended method of copying is the following:
|
|
116
|
+
|
|
117
|
+
* If you are not working over SSH, use the micro keybinding (`Ctrl-c` by
|
|
118
|
+
default) to perform copies. If on Linux, install `xclip` or `xsel`
|
|
119
|
+
beforehand.
|
|
120
|
+
|
|
121
|
+
* If you are working over SSH, use the terminal keybinding
|
|
122
|
+
(`Ctrl-Shift-c` or `Command-c`) to perform copies. You must first disable
|
|
123
|
+
the `mouse` option to perform a terminal selection, and you may wish
|
|
124
|
+
to disable line numbers and diff indicators (`ruler` and `diffgutter`
|
|
125
|
+
options) and close other splits. This method will only be able to copy
|
|
126
|
+
characters that are displayed on the screen (you will not be able to
|
|
127
|
+
copy more than one page's worth of characters).
|
|
128
|
+
|
|
129
|
+
Copying follows a similar discussion to the one above about pasting.
|
|
130
|
+
The primary difference is before performing a copy, the application
|
|
131
|
+
doing the copy must be told what text needs to be copied.
|
|
132
|
+
|
|
133
|
+
Micro has a keybinding (`Ctrl-c`) for copying and will access the system
|
|
134
|
+
clipboard to perform the copy. The text that micro will copy into is
|
|
135
|
+
the text that is currently selected in micro (usually such text is
|
|
136
|
+
displayed with a white background). When the `mouse` option is enabled,
|
|
137
|
+
the mouse can be used to select text, as well as other keybindings,
|
|
138
|
+
such as ShiftLeft, etc...
|
|
139
|
+
|
|
140
|
+
The terminal also has a keybinding (`Ctrl-Shift-c` or `Command-c`) to perform
|
|
141
|
+
a copy, and the text that it copies is the text selected by the terminal's
|
|
142
|
+
selection (*not* micro's selection). To select text with the terminal
|
|
143
|
+
selection, micro's mouse support must first be disabled by turning the
|
|
144
|
+
`mouse` option off. The terminal, unlike micro, has no sense of different
|
|
145
|
+
buffers/splits and what the different characters being displayed are. This
|
|
146
|
+
means that for copying multiple lines using the terminal selection, you
|
|
147
|
+
should first disable line numbers and diff indicators (turn off the `ruler`
|
|
148
|
+
and `diffgutter` options), otherwise they might be part of your selection
|
|
149
|
+
and copied.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Default Keys
|
|
2
|
+
|
|
3
|
+
Below are simple charts of the default hotkeys and their functions. For more
|
|
4
|
+
information about binding custom hotkeys or changing default bindings, please
|
|
5
|
+
run `> help keybindings`
|
|
6
|
+
|
|
7
|
+
Please remember that *all* keys here are rebindable! If you don't like it, you
|
|
8
|
+
can change it!
|
|
9
|
+
|
|
10
|
+
### Power user
|
|
11
|
+
|
|
12
|
+
| Key | Description of function |
|
|
13
|
+
|---------- |-------------------------------------------------------------------------------------------------- |
|
|
14
|
+
| Ctrl-e | Open a command prompt for running commands (see `> help commands` for a list of valid commands). |
|
|
15
|
+
| Tab | In command prompt, it will autocomplete if possible. |
|
|
16
|
+
| Ctrl-b | Run a shell command (this will close micro while your command executes). |
|
|
17
|
+
|
|
18
|
+
### Navigation
|
|
19
|
+
|
|
20
|
+
| Key | Description of function |
|
|
21
|
+
|---------------------------- |------------------------------------------------------------------------------------------ |
|
|
22
|
+
| Arrows | Move the cursor around |
|
|
23
|
+
| Shift-arrows | Move and select text |
|
|
24
|
+
| Alt(Ctrl on Mac)-LeftArrow | Move to the beginning of the current line |
|
|
25
|
+
| Alt(Ctrl on Mac)-RightArrow | Move to the end of the current line |
|
|
26
|
+
| Home | Move to the beginning of text on the current line |
|
|
27
|
+
| End | Move to the end of the current line |
|
|
28
|
+
| Ctrl(Alt on Mac)-LeftArrow | Move cursor one word left |
|
|
29
|
+
| Ctrl(Alt on Mac)-RightArrow | Move cursor one word right |
|
|
30
|
+
| Alt-{ | Move cursor to previous empty line, or beginning of document |
|
|
31
|
+
| Alt-} | Move cursor to next empty line, or end of document |
|
|
32
|
+
| PageUp | Move cursor up one page |
|
|
33
|
+
| PageDown | Move cursor down one page |
|
|
34
|
+
| Ctrl-Home or Ctrl-UpArrow | Move cursor to start of document |
|
|
35
|
+
| Ctrl-End or Ctrl-DownArrow | Move cursor to end of document |
|
|
36
|
+
| Ctrl-l | Jump to a line in the file (prompts with #) |
|
|
37
|
+
| Ctrl-w | Cycle between splits in the current tab (use `> vsplit` or `> hsplit` to create a split) |
|
|
38
|
+
|
|
39
|
+
### Tabs
|
|
40
|
+
|
|
41
|
+
| Key | Description of function |
|
|
42
|
+
|------------- |-------------------------- |
|
|
43
|
+
| Ctrl-t | Open a new tab |
|
|
44
|
+
| Alt-, Alt-p | Previous tab |
|
|
45
|
+
| Alt-. Alt-t | Next tab |
|
|
46
|
+
|
|
47
|
+
### Find Operations
|
|
48
|
+
|
|
49
|
+
| Key | Description of function |
|
|
50
|
+
|---------- |------------------------------------------ |
|
|
51
|
+
| Ctrl-f | Find (opens prompt) |
|
|
52
|
+
| Ctrl-n | Find next instance of current search |
|
|
53
|
+
| Ctrl-p | Find previous instance of current search |
|
|
54
|
+
|
|
55
|
+
Note: `Ctrl-n` and `Ctrl-p` should be used from the main buffer, not from inside
|
|
56
|
+
the search prompt. After `Ctrl-f`, press enter to complete the search and then
|
|
57
|
+
you can use `Ctrl-n` and `Ctrl-p` to cycle through matches.
|
|
58
|
+
|
|
59
|
+
### File Operations
|
|
60
|
+
|
|
61
|
+
| Key | Description of function |
|
|
62
|
+
|-------------- |------------------------------------------------------------------ |
|
|
63
|
+
| Ctrl-q Alt-q | Close current file (quits micro if this is the last file open) |
|
|
64
|
+
| Ctrl-o | Open a file (prompts for filename) |
|
|
65
|
+
| Ctrl-s | Save current file |
|
|
66
|
+
|
|
67
|
+
### Text operations
|
|
68
|
+
|
|
69
|
+
| Key | Description of function |
|
|
70
|
+
|------------------------------------ |------------------------------------------ |
|
|
71
|
+
| Ctrl(Alt on Mac)-Shift-RightArrow | Select word right |
|
|
72
|
+
| Ctrl(Alt on Mac)-Shift-LeftArrow | Select word left |
|
|
73
|
+
| Alt(Ctrl on Mac)-Shift-LeftArrow | Select to start of current line |
|
|
74
|
+
| Alt(Ctrl on Mac)-Shift-RightArrow | Select to end of current line |
|
|
75
|
+
| Shift-Home | Select to start of current line |
|
|
76
|
+
| Shift-End | Select to end of current line |
|
|
77
|
+
| Ctrl-Shift-UpArrow | Select to start of file |
|
|
78
|
+
| Ctrl-Shift-DownArrow | Select to end of file |
|
|
79
|
+
| Ctrl-x | Cut selected text |
|
|
80
|
+
| Ctrl-c | Copy selected text |
|
|
81
|
+
| Ctrl-v | Paste |
|
|
82
|
+
| Ctrl-k | Cut current line |
|
|
83
|
+
| Ctrl-d | Duplicate current line |
|
|
84
|
+
| Ctrl-z | Undo |
|
|
85
|
+
| Ctrl-y | Redo |
|
|
86
|
+
| Alt-UpArrow Alt-k | Move current line or selected lines up |
|
|
87
|
+
| Alt-DownArrow Alt-j | Move current line or selected lines down |
|
|
88
|
+
| Alt-Backspace or Alt-Ctrl-h | Delete word left |
|
|
89
|
+
| Ctrl-a | Select all |
|
|
90
|
+
| Tab | Indent selected text |
|
|
91
|
+
| Shift-Tab | Unindent selected text |
|
|
92
|
+
|
|
93
|
+
### Macros(not implemented yet)
|
|
94
|
+
|
|
95
|
+
| Key | Description of function |
|
|
96
|
+
|---------- |---------------------------------------------------------------------------------- |
|
|
97
|
+
| Ctrl-u | Toggle macro recording (press Ctrl-u to start recording and press again to stop) |
|
|
98
|
+
| Ctrl-j | Run latest recorded macro |
|
|
99
|
+
|
|
100
|
+
### Multiple cursors(not implemented yet)
|
|
101
|
+
|
|
102
|
+
| Key | Description of function |
|
|
103
|
+
|------------------ |---------------------------------------------------------------------------------------------- |
|
|
104
|
+
| Alt-n | Create new multiple cursor from selection (will select current word if no current selection) |
|
|
105
|
+
| Alt-Shift-Up | Spawn a new cursor on the line above the current one |
|
|
106
|
+
| Alt-Shift-Down | Spawn a new cursor on the line below the current one |
|
|
107
|
+
| Alt-p | Remove latest multiple cursor |
|
|
108
|
+
| Alt-c | Remove all multiple cursors (cancel) |
|
|
109
|
+
| Alt-x | Skip multiple cursor selection |
|
|
110
|
+
| Alt-m | Spawn a new cursor at the beginning of every line in the current selection |
|
|
111
|
+
| Ctrl-MouseLeft | Place a multiple cursor at any location |
|
|
112
|
+
|
|
113
|
+
### Other
|
|
114
|
+
|
|
115
|
+
| Key | Description of function |
|
|
116
|
+
|---------- |-------------------------------------------------------------------------------------- |
|
|
117
|
+
| Ctrl-g | Open help file |
|
|
118
|
+
| Ctrl-h | Backspace (old terminals do not support the backspace key and use Ctrl+H instead) |
|
|
119
|
+
| Ctrl-r | Toggle the line number ruler |
|
|
120
|
+
|
|
121
|
+
### Emacs style actions
|
|
122
|
+
|
|
123
|
+
| Key | Description of function |
|
|
124
|
+
|---------- |-------------------------- |
|
|
125
|
+
| Alt-f | Next word |
|
|
126
|
+
| Alt-b | Previous word |
|
|
127
|
+
| Alt-a | Move to start of line |
|
|
128
|
+
| Alt-e | Move to end of line |
|
|
129
|
+
|
|
130
|
+
### Function keys.
|
|
131
|
+
|
|
132
|
+
Warning! The function keys may not work in all terminals!
|
|
133
|
+
|
|
134
|
+
| Key | Description of function |
|
|
135
|
+
|------ |-------------------------- |
|
|
136
|
+
| F1 | Open help |
|
|
137
|
+
| F2 | Save |
|
|
138
|
+
| F3 | Find |
|
|
139
|
+
| F4 | Quit |
|
|
140
|
+
| F7 | Find |
|
|
141
|
+
| F10 | Quit |
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Micro help text
|
|
2
|
+
|
|
3
|
+
Micro is an easy to use, intuitive, text editor that takes advantage of the
|
|
4
|
+
full capabilities of modern terminals.
|
|
5
|
+
|
|
6
|
+
Micro can be controlled by commands entered on the command bar, or with
|
|
7
|
+
keybindings. To open the command bar, press `Ctrl-e`: the `>` prompt will
|
|
8
|
+
display. From now on, when the documentation shows a command to run (such as
|
|
9
|
+
`> help`), press `Ctrl-e` and type the command followed by enter.
|
|
10
|
+
|
|
11
|
+
For a list of the default keybindings, run `> help defaultkeys`.
|
|
12
|
+
For more information on keybindings, see `> help keybindings`.
|
|
13
|
+
To toggle a short list of important keybindings, press Alt-g.
|
|
14
|
+
|
|
15
|
+
## Quick-start
|
|
16
|
+
|
|
17
|
+
To quit, press `Ctrl-q`. Save by pressing `Ctrl-s`. Press `Ctrl-e`, as previously
|
|
18
|
+
mentioned, to start typing commands. To see which commands are available, at the
|
|
19
|
+
prompt, press tab, or view the help topic with `> help commands`.
|
|
20
|
+
|
|
21
|
+
Move the cursor around with the mouse or with the arrow keys. Enter text simply
|
|
22
|
+
by pressing character keys.
|
|
23
|
+
|
|
24
|
+
If the colorscheme doesn't look good, you can change it with
|
|
25
|
+
`> set colorscheme ...`. You can press tab to see the available colorschemes,
|
|
26
|
+
or see more information about colorschemes and syntax highlighting with `> help
|
|
27
|
+
colors`.
|
|
28
|
+
|
|
29
|
+
Press `Ctrl-w` to move between splits, and type `> vsplit filename` or
|
|
30
|
+
`> hsplit filename` to open a new split.
|
|
31
|
+
|
|
32
|
+
## Accessing more help
|
|
33
|
+
|
|
34
|
+
Micro has a built-in help system which can be accessed with the `> help` command.
|
|
35
|
+
|
|
36
|
+
To view help for the various available topics, press `Ctrl-e` to access command
|
|
37
|
+
mode and type in `> help` followed by a topic. Typing just `> help` will open
|
|
38
|
+
this page.
|
|
39
|
+
|
|
40
|
+
Here are the available help topics:
|
|
41
|
+
|
|
42
|
+
* `tutorial`: A brief tutorial which gives an overview of all the other help
|
|
43
|
+
topics
|
|
44
|
+
* `keybindings`: Gives a full list of the default keybindings as well as how to
|
|
45
|
+
rebind them
|
|
46
|
+
* `defaultkeys`: Gives a more straight-forward list of the hotkey commands and
|
|
47
|
+
what they do
|
|
48
|
+
* `commands`: Gives a list of all the commands and what they do
|
|
49
|
+
* `options`: Gives a list of all the options you can customize
|
|
50
|
+
* `plugins`: Explains how micro's plugin system works and how to create your own
|
|
51
|
+
plugins
|
|
52
|
+
* `colors`: Explains micro's colorscheme and syntax highlighting engine and how
|
|
53
|
+
to create your own colorschemes or add new languages to the engine
|
|
54
|
+
* `copypaste`: Explains micro's copy and paste usage and configuration.
|
|
55
|
+
It describes how copy and paste is working on different operating systems and
|
|
56
|
+
setups.
|
|
57
|
+
|
|
58
|
+
For example, to open the help page on plugins you would run `> help plugins`.
|
|
59
|
+
|
|
60
|
+
I recommend looking at the `tutorial` help file because it is short for each
|
|
61
|
+
section and gives concrete examples of how to use the various configuration
|
|
62
|
+
options in micro. However, it does not give the in-depth documentation that the
|
|
63
|
+
other topics provide.
|