mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-25 18:07:07 +09:00
Update docs
This commit is contained in:
@@ -7,7 +7,7 @@ This help page aims to cover two aspects of micro's syntax highlighting engine:
|
|||||||
|
|
||||||
## Colorschemes
|
## Colorschemes
|
||||||
|
|
||||||
To change your colorscheme, press Ctrl-e in micro to bring up the command
|
To change your colorscheme, press CtrlE in micro to bring up the command
|
||||||
prompt, and type:
|
prompt, and type:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Command bar
|
# Command bar
|
||||||
|
|
||||||
The command bar is opened by pressing Ctrl-e. It is a single-line buffer,
|
The command bar is opened by pressing CtrlE. It is a single-line buffer,
|
||||||
meaning that all keybindings from a normal buffer are supported (as well
|
meaning that all keybindings from a normal buffer are supported (as well
|
||||||
as mouse and selection).
|
as mouse and selection).
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ does not look up environment variables.
|
|||||||
# Commands
|
# Commands
|
||||||
|
|
||||||
Micro provides the following commands that can be executed at the command-bar by
|
Micro provides the following commands that can be executed at the command-bar by
|
||||||
pressing `Ctrl-e` and entering the command. Arguments are placed in single
|
pressing `CtrlE` and entering the command. Arguments are placed in single
|
||||||
quotes here but these are not necessary when entering the command in micro.
|
quotes here but these are not necessary when entering the command in micro.
|
||||||
|
|
||||||
* `bind 'key' 'action'`: creates a keybinding from key to action. See the
|
* `bind 'key' 'action'`: creates a keybinding from key to action. See the
|
||||||
@@ -69,14 +69,21 @@ quotes here but these are not necessary when entering the command in micro.
|
|||||||
as standard input and replaces the selection with the stdout of the shell command.
|
as standard input and replaces the selection with the stdout of the shell command.
|
||||||
For example, to sort a list of numbers, first select them, and then execute
|
For example, to sort a list of numbers, first select them, and then execute
|
||||||
`> textfilter sort -n`.
|
`> textfilter sort -n`.
|
||||||
|
|
||||||
* `log`: opens a log of all messages and debug statements.
|
* `log`: opens a log of all messages and debug statements.
|
||||||
|
|
||||||
* `plugin 'list'`: lists all installed plugins.
|
* `plugin list`: lists all installed plugins.
|
||||||
|
|
||||||
* `plugin version 'pl'`: shows version for specified plugin.
|
* `plugin install 'pl'`: install a plugin.
|
||||||
|
|
||||||
* `plugin info 'pl'`: shows additional info for specified plugin.
|
* `plugin remove 'pl'`: remove a plugin.
|
||||||
|
|
||||||
|
* `plugin update 'pl'`: update a plugin (if no arguments are provided
|
||||||
|
updates all plugins).
|
||||||
|
|
||||||
|
* `plugin search 'pl'`: search available plugins for a keyword.
|
||||||
|
|
||||||
|
* `plugin available`: show available plugins that can be installed.
|
||||||
|
|
||||||
* `reload`: reloads all runtime files.
|
* `reload`: reloads all runtime files.
|
||||||
|
|
||||||
@@ -99,10 +106,12 @@ quotes here but these are not necessary when entering the command in micro.
|
|||||||
* `showkey`: Show the action(s) bound to a given key. For example
|
* `showkey`: Show the action(s) bound to a given key. For example
|
||||||
running `> showkey CtrlC` will display `Copy`.
|
running `> showkey CtrlC` will display `Copy`.
|
||||||
|
|
||||||
|
* `term exec?`: Open a terminal emulator running the given executable. If no
|
||||||
|
executable is given, this will open the default shell in the terminal emulator.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
The following commands are provided by the default plugins:
|
The following commands are provided by the default plugins:
|
||||||
|
|
||||||
* `lint`: Lint the current file for errors.
|
* `lint`: Lint the current file for errors.
|
||||||
|
|
||||||
* `comment`: automatically comment or uncomment current selection or line.
|
* `comment`: automatically comment or uncomment current selection or line.
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
Micro is a terminal-based text editor that aims to be easy to use and intuitive,
|
Micro is a terminal-based text editor that aims to be easy to use and intuitive,
|
||||||
while also taking advantage of the full capabilities of modern terminals.
|
while also taking advantage of the full capabilities of modern terminals.
|
||||||
|
|
||||||
To open the command bar, press Ctrl-e. This enables a `>` prompt for typing
|
To open the command bar, press CtrlE. This enables a `>` prompt for typing
|
||||||
commands. From now on when the documentation says to run a command such as
|
commands. From now on when the documentation says to run a command such as
|
||||||
`> help`, this means press Ctrl-e and type `help` (and press enter to execute
|
`> help`, this means press CtrlE and type `help` (and press enter to execute
|
||||||
the command).
|
the command).
|
||||||
|
|
||||||
For a list of the default keybindings run `> help defaultkeys`.
|
For a list of the default keybindings run `> help defaultkeys`.
|
||||||
@@ -13,7 +13,7 @@ For more information on keybindings see `> help keybindings`.
|
|||||||
|
|
||||||
## Quick-start
|
## Quick-start
|
||||||
|
|
||||||
Press Ctrl-q to quit, and Ctrl-s to save. Press Ctrl-e to start typing commands and
|
Press Ctrl-q to quit, and Ctrl-s to save. Press CtrlE to start typing commands and
|
||||||
you can see which commands are available by pressing tab, or by viewing the help
|
you can see which commands are available by pressing tab, or by viewing the help
|
||||||
topic `> help commands`.
|
topic `> help commands`.
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ Press Ctrl-w to move between splits, and type `> vsplit filename` or
|
|||||||
|
|
||||||
Micro has a built-in help system which can be accessed with the `help` command.
|
Micro has a built-in help system which can be accessed with the `help` command.
|
||||||
|
|
||||||
To use it, press Ctrl-e to access command mode and type in `help` followed by a
|
To use it, press CtrlE to access command mode and type in `help` followed by a
|
||||||
topic. Typing `help` followed by nothing will open this page.
|
topic. Typing `help` followed by nothing will open this page.
|
||||||
|
|
||||||
Here are the possible help topics that you can read:
|
Here are the possible help topics that you can read:
|
||||||
|
|||||||
@@ -300,12 +300,43 @@ your own plugins.
|
|||||||
|
|
||||||
## Plugin Manager
|
## Plugin Manager
|
||||||
|
|
||||||
Micro's plugin manager is you! Ultimately the plugins that are created
|
Micro also has a built in plugin manager which you can invoke with the
|
||||||
for micro are quite simple and don't require a complex automated tool
|
`> plugin ...` command, or in the shell with `micro -plugin ...`.
|
||||||
to manage them. They should be "git cloned" or somehow placed in the
|
|
||||||
`~/.config/micro/plug` directory, and that is all that's necessary
|
For the valid commands you can use, see the `command` help topic.
|
||||||
for installation. In the rare case that a more complex installation
|
|
||||||
process is needed (such as dependencies, or additional setup) the
|
The manager fetches plugins from the channels (which is simply a list of plugin
|
||||||
plugin creator should provide the additional instructions on their
|
metadata) which it knows about. By default, micro only knows about the official
|
||||||
website and point to the link using the `install` field in the `info.json`
|
channel which is located at github.com/micro-editor/plugin-channel but you can
|
||||||
file.
|
add your own third-party channels using the `pluginchannels` option and you can
|
||||||
|
directly link third-party plugins to allow installation through the plugin
|
||||||
|
manager with the `pluginrepos` option.
|
||||||
|
|
||||||
|
If you'd like to publish a plugin you've made as an official plugin, you should
|
||||||
|
upload your plugin online (to Github preferably) and add a `repo.json` file.
|
||||||
|
This file will contain the metadata for your plugin. Here is an example:
|
||||||
|
|
||||||
|
```json
|
||||||
|
[{
|
||||||
|
"Name": "pluginname",
|
||||||
|
"Description": "Here is a nice concise description of my plugin",
|
||||||
|
"Website": "https://github.com/user/plugin"
|
||||||
|
"Tags": ["python", "linting"],
|
||||||
|
"Versions": [
|
||||||
|
{
|
||||||
|
"Version": "1.0.0",
|
||||||
|
"Url": "https://github.com/user/plugin/archive/v1.0.0.zip",
|
||||||
|
"Require": {
|
||||||
|
"micro": ">=1.0.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
```
|
||||||
|
|
||||||
|
Then open a pull request at github.com/micro-editor/plugin-channel adding a link
|
||||||
|
to the raw `repo.json` that is in your plugin repository.
|
||||||
|
|
||||||
|
To make updating the plugin work, the first line of your plugins lua code
|
||||||
|
should contain the version of the plugin. (Like this: `VERSION = "1.0.0"`)
|
||||||
|
Please make sure to use [semver](http://semver.org/) for versioning.
|
||||||
|
|||||||
Reference in New Issue
Block a user