Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

help: Exchange all indentations to spaces and remove trailing ws #3193

Merged
merged 4 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions runtime/help/colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This help page aims to cover two aspects of micro's syntax highlighting engine:

## Colorschemes

To change your colorscheme, press Ctrl-e in micro to bring up the command
To change your colorscheme, press `Ctrl-e` in micro to bring up the command
prompt, and type:

```
Expand Down Expand Up @@ -93,7 +93,7 @@ and set this variable yourself.
* `solarized-tc`: this is the solarized colorscheme for true color.
* `atom-dark`: this colorscheme is based off of Atom's "dark" colorscheme.
* `cmc-tc`: A true colour variant of the cmc theme. It requires true color to
look its best. Use cmc-16 if your terminal doesn't support true color.
look its best. Use cmc-16 if your terminal doesn't support true color.
* `gruvbox-tc`: The true color version of the gruvbox colorscheme
* `material-tc`: Colorscheme based off of Google's Material Design palette

Expand All @@ -106,7 +106,7 @@ be found
Custom colorschemes should be placed in the `~/.config/micro/colorschemes`
directory.

A number of custom directives are placed in a `.micro` file. Colorschemes are
A number of custom directives are placed in a `.micro` file. Colorschemes are
typically only 18-30 lines in total.

To create the colorscheme you need to link highlight groups with
Expand Down Expand Up @@ -152,7 +152,7 @@ Then you can use the terminals 256 colors by using their numbers 1-256 (numbers

If the user's terminal supports true color, then you can also specify colors
exactly using their hex codes. If the terminal is not true color but micro is
told to use a true color colorscheme it will attempt to map the colors to the
told to use a true color colorscheme it will attempt to map the colors to the
available 256 colors.

Generally colorschemes which require true color terminals to look good are
Expand Down Expand Up @@ -213,18 +213,18 @@ that for highlighting strings. If it's not found, it will use constant instead.
Micro tries to match the largest set of groups it can find in the colorscheme
definitions, so if, for examle `constant.bool.true` is found then micro will
use that. If `constant.bool.true` is not found but `constant.bool` is found
micro will use `constant.bool`. If not, it uses `constant`.
micro will use `constant.bool`. If not, it uses `constant`.

Here's a list of subgroups used in micro's built-in syntax files.

* comment.bright (Some filetypes have distinctions between types of comments)
* constant.bool
* constant.bool.true
* constant.bool.false
* constant.number
* constant.number
* constant.specialChar
* constant.string
* constant.string.url
* constant.string.url
* identifier.class (Also used for functions)
* identifier.macro
* identifier.var
Expand All @@ -248,7 +248,7 @@ languages.

Micro's builtin syntax highlighting tries very hard to be sane, sensible and
provide ample coverage of the meaningful elements of a language. Micro has
syntax files built in for over 100 languages now! However, there may be
syntax files built in for over 100 languages now! However, there may be
situations where you find Micro's highlighting to be insufficient or not to
your liking. The good news is that you can create your own syntax files, and
place them in `~/.config/micro/syntax` and Micro will use those instead.
Expand Down
10 changes: 5 additions & 5 deletions runtime/help/commands.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Command bar

The command bar is opened by pressing Ctrl-e. It is a single-line buffer,
The command bar is opened by pressing `Ctrl-e`. It is a single-line buffer,
meaning that all keybindings from a normal buffer are supported (as well
as mouse and selection).

Expand Down Expand Up @@ -35,12 +35,12 @@ quotes here but these are not necessary when entering the command in micro.
passed to jump inward from the end of the file; for example, -5 jumps
to the 5th-last line in the file.

* `replace 'search' 'value' ['flags']`: This will replace `search` with `value`.
* `replace 'search' 'value' ['flags']`: This will replace `search` with `value`.
The `flags` are optional. Possible flags are:
* `-a`: Replace all occurrences at once
* `-l`: Do a literal search instead of a regex search

Note that `search` must be a valid regex (unless `-l` is passed). If one
Note that `search` must be a valid regex (unless `-l` is passed). If one
of the arguments does not have any spaces in it, you may omit the quotes.

In case the search is done non-literal (without `-l`), the 'value'
Expand All @@ -52,7 +52,7 @@ quotes here but these are not necessary when entering the command in micro.
* `replaceall 'search' 'value'`: this will replace all occurrences of `search`
with `value` without user confirmation.

See `replace` command for more information.
See `replace` command for more information.

* `set 'option' 'value'`: sets the option to value. See the `options` help
topic for a list of options you can set. This will modify your
Expand All @@ -63,7 +63,7 @@ quotes here but these are not necessary when entering the command in micro.

* `show 'option'`: shows the current value of the given option.

* `run 'sh-command'`: runs the given shell command in the background. The
* `run 'sh-command'`: runs the given shell command in the background. The
command's output will be displayed in one line when it finishes running.

* `vsplit ['filename']`: opens a vertical split with `filename`. If no filename
Expand Down
38 changes: 19 additions & 19 deletions runtime/help/copypaste.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ is limited support among terminal emulators for the terminal clipboard
(which uses the OSC 52 protocol to communicate clipboard contents).
Here is a list of terminal emulators and their status:

* Kitty: supported, but only writing is enabled by default. To enable
reading, add `read-primary` and `read-clipboard` to the
`clipboard_control` option.
* `Kitty`: supported, but only writing is enabled by default. To enable
reading, add `read-primary` and `read-clipboard` to the
`clipboard_control` option.

* iTerm2: only copying (writing to clipboard) is supported. Must be enabled in
`Preferences->General-> Selection->Applications in terminal may access clipboard`.
You can use Command-v to paste.
* `iTerm2`: only copying (writing to clipboard) is supported. Must be enabled in
`Preferences->General-> Selection->Applications in terminal may access clipboard`.
You can use `Command-v` to paste.

* `st`: supported.

Expand All @@ -32,7 +32,7 @@ Here is a list of terminal emulators and their status:
* `gnome-terminal`: does not support OSC 52.

* `alacritty`: supported. Since 0.13.0, reading has been disabled by default.
To reenable it, set the `terminal.osc52` option to `CopyPaste`.
To reenable it, set the `terminal.osc52` option to `CopyPaste`.

* `foot`: supported.

Expand All @@ -49,12 +49,12 @@ supports OSC 52.

The recommended method of pasting is the following:

* If you are not working over SSH, use the micro keybinding (Ctrl-v
* If you are not working over SSH, use the micro keybinding (`Ctrl-v`
by default) to perform pastes. If on Linux, install `xclip` or
`xsel` beforehand.

* If you are working over SSH, use the terminal keybinding
(Ctrl-Shift-v or Command-v) to perform pastes. If your terminal
(`Ctrl-Shift-v` or `Command-v`) to perform pastes. If your terminal
does not support bracketed paste, when performing a paste first
enable the `paste` option, and when finished disable the option.

Expand All @@ -63,8 +63,8 @@ The recommended method of pasting is the following:
Micro is an application that runs within the terminal. This means
that the terminal sends micro events, such as key events, mouse
events, resize events, and paste events. Micro's default keybinding
for paste is Ctrl-v. This means that when micro receives the key
event saying Ctrl-v has been pressed from the terminal, it will
for paste is `Ctrl-v`. This means that when micro receives the key
event saying `Ctrl-v` has been pressed from the terminal, it will
attempt to access the system clipboard and effect a paste. The
system clipboard will be accessed through `pbpaste` on MacOS
(installed by default), `xclip` or `xsel` on Linux (these
Expand All @@ -77,8 +77,8 @@ For certain keypresses, the terminal will not send an event to
micro and will instead do something itself. In this document,
such keypresses will be called "terminal keybindings." Often
there will be a terminal keybinding for pasting and copying. On
MacOS these are Command-v and Command-c and on Linux Ctrl-Shift-v
and Ctrl-Shift-c. When the terminal keybinding for paste is
MacOS these are Command-v and Command-c and on Linux `Ctrl-Shift-v`
and `Ctrl-Shift-c`. When the terminal keybinding for paste is
executed, your terminal will access the system clipboard, and send
micro either a paste event or a list of key events (one key for each
character in the paste), depending on whether or not your terminal
Expand All @@ -90,7 +90,7 @@ sends a list of key events, this can cause issues because micro
will think you manually entered each character and may add closing
brackets or automatic indentation, which will mess up the pasted
text. To avoid this, you can temporarily enable the `paste` option
while you perform the paste. When paste option is on, micro will
while you perform the paste. When paste option is on, micro will
aggregate lists of multiple key events into larger paste events.
It is a good idea to disable the `paste` option during normal use
as occasionally if you are typing quickly, the terminal will send
Expand All @@ -101,7 +101,7 @@ entered.

When working over SSH, micro is running on the remote machine and
your terminal is running on your local machine. Therefore if you
would like to paste, using Ctrl-v (micro's keybinding) will not
would like to paste, using `Ctrl-v` (micro's keybinding) will not
work because when micro attempts to access the system clipboard,
it will access the remote machine's clipboard rather than the local
machine's clipboard. On the other hand, the terminal keybinding
Expand All @@ -114,12 +114,12 @@ the network as a paste event, which is what you want.

The recommended method of copying is the following:

* If you are not working over SSH, use the micro keybinding (Ctrl-c by
* If you are not working over SSH, use the micro keybinding (`Ctrl-c` by
default) to perform copies. If on Linux, install `xclip` or `xsel`
beforehand.

* If you are working over SSH, use the terminal keybinding
(Ctrl-Shift-c or Command-c) to perform copies. You must first disable
(`Ctrl-Shift-c` or `Command-c`) to perform copies. You must first disable
the `mouse` option to perform a terminal selection, and you may wish
to disable line numbers and diff indicators (`ruler` and `diffgutter`
options) and close other splits. This method will only be able to copy
Expand All @@ -130,14 +130,14 @@ Copying follows a similar discussion to the one above about pasting.
The primary difference is before performing a copy, the application
doing the copy must be told what text needs to be copied.

Micro has a keybinding (Ctrl-c) for copying and will access the system
Micro has a keybinding (`Ctrl-c`) for copying and will access the system
clipboard to perform the copy. The text that micro will copy into is
the text that is currently selected in micro (usually such text is
displayed with a white background). When the `mouse` option is enabled,
the mouse can be used to select text, as well as other keybindings,
such as ShiftLeft, etc...

The terminal also has a keybinding (Ctrl-Shift-c or Command-c) to perform
The terminal also has a keybinding (`Ctrl-Shift-c` or `Command-c`) to perform
a copy, and the text that it copies is the text selected by the terminal's
selection (*not* micro's selection). To select text with the terminal
selection, micro's mouse support must first be disabled by turning the
Expand Down
8 changes: 4 additions & 4 deletions runtime/help/defaultkeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ can change it!
| Ctrl-n | Find next instance of current search |
| Ctrl-p | Find previous instance of current search |

Note: Ctrl-n and Ctrl-p should be used from the main buffer, not from inside
the search prompt. After Ctrl-f, press enter to complete the search and then
you can use Ctrl-n and Ctrl-p to cycle through matches.
Note: `Ctrl-n` and `Ctrl-p` should be used from the main buffer, not from inside
the search prompt. After `Ctrl-f`, press enter to complete the search and then
you can use `Ctrl-n` and `Ctrl-p` to cycle through matches.

### File Operations

Expand Down Expand Up @@ -129,7 +129,7 @@ you can use Ctrl-n and Ctrl-p to cycle through matches.

### Function keys.

Warning! The function keys may not work in all terminals!
Warning! The function keys may not work in all terminals!

| Key | Description of function |
|------ |-------------------------- |
Expand Down
34 changes: 17 additions & 17 deletions runtime/help/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ Micro is an easy to use, intuitive, text editor that takes advantage of the
full capabilities of modern terminals.

Micro can be controlled by commands entered on the command bar, or with
keybindings. To open the command bar, press Ctrl-e: the `>` prompt will
keybindings. To open the command bar, press `Ctrl-e`: the `>` prompt will
display. From now on, when the documentation shows a command to run (such as
`> help`), press Ctrl-e and type the command followed by enter.
`> help`), press `Ctrl-e` and type the command followed by enter.

For a list of the default keybindings, run `> help defaultkeys`.
For more information on keybindings, see `> help keybindings`.
To toggle a short list of important keybindings, press Alt-g.

## Quick-start

To quit, press Ctrl-q. Save by pressing Ctrl-s. Press Ctrl-e, as previously
To quit, press `Ctrl-q`. Save by pressing `Ctrl-s`. Press `Ctrl-e`, as previously
mentioned, to start typing commands. To see which commands are available, at the
prompt, press tab, or view the help topic with `> help commands`.

Expand All @@ -26,31 +26,31 @@ If the colorscheme doesn't look good, you can change it with
or see more information about colorschemes and syntax highlighting with `> help
colors`.

Press Ctrl-w to move between splits, and type `> vsplit filename` or
Press `Ctrl-w` to move between splits, and type `> vsplit filename` or
`> hsplit filename` to open a new split.

## Accessing more help

Micro has a built-in help system which can be accessed with the `> help` command.

To view help for the various available topics, press Ctrl-e to access command
To view help for the various available topics, press `Ctrl-e` to access command
mode and type in `> help` followed by a topic. Typing just `> help` will open
this page.

Here are the available help topics:

* tutorial: A brief tutorial which gives an overview of all the other help
topics
* keybindings: Gives a full list of the default keybindings as well as how to
rebind them
* defaultkeys: Gives a more straight-forward list of the hotkey commands and
what they do
* commands: Gives a list of all the commands and what they do
* options: Gives a list of all the options you can customize
* plugins: Explains how micro's plugin system works and how to create your own
plugins
* colors: Explains micro's colorscheme and syntax highlighting engine and how
to create your own colorschemes or add new languages to the engine
* `tutorial`: A brief tutorial which gives an overview of all the other help
topics
* `keybindings`: Gives a full list of the default keybindings as well as how to
rebind them
* `defaultkeys`: Gives a more straight-forward list of the hotkey commands and
what they do
* `commands`: Gives a list of all the commands and what they do
* `options`: Gives a list of all the options you can customize
* `plugins`: Explains how micro's plugin system works and how to create your own
plugins
* `colors`: Explains micro's colorscheme and syntax highlighting engine and how
to create your own colorschemes or add new languages to the engine

For example, to open the help page on plugins you would run `> help plugins`.

Expand Down
8 changes: 4 additions & 4 deletions runtime/help/keybindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ following in the `bindings.json` file.
```

**Note:** The syntax `<Modifier><key>` is equivalent to `<Modifier>-<key>`. In
addition, Ctrl-Shift bindings are not supported by terminals, and are the same
as simply Ctrl bindings. This means that `CtrlG`, `Ctrl-G`, and `Ctrl-g` all
mean the same thing. However, for Alt this is not the case: `AltG` and `Alt-G`
addition, `Ctrl-Shift` bindings are not supported by terminals, and are the same
as simply `Ctrl` bindings. This means that `CtrlG`, `Ctrl-G`, and `Ctrl-g` all
mean the same thing. However, for `Alt` this is not the case: `AltG` and `Alt-G`
mean `Alt-Shift-g`, while `Alt-g` does not require the Shift modifier.

In addition to editing your `~/.config/micro/bindings.json`, you can run
`>bind <keycombo> <action>` For a list of bindable actions, see below.

You can also chain commands when rebinding. For example, if you want Alt-s to
You can also chain commands when rebinding. For example, if you want `Alt-s` to
save and quit you can bind it like so:

```json
Expand Down
Loading
Loading