1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-13 10:15:41 +08:00

docs(documentation): update doc about code runner and repl

close https://github.com/SpaceVim/SpaceVim/issues/4657
This commit is contained in:
wsdjeg 2022-05-08 22:08:54 +08:00
parent d4bf364cbe
commit 080c793261

View File

@ -86,7 +86,8 @@ description: "General documentation about how to use SpaceVim, including the qui
- [Todo manager](#todo-manager) - [Todo manager](#todo-manager)
- [Replace text with iedit](#replace-text-with-iedit) - [Replace text with iedit](#replace-text-with-iedit)
- [iedit states key bindings](#iedit-states-key-bindings) - [iedit states key bindings](#iedit-states-key-bindings)
- [Code runner and REPL](#code-runner-and-repl) - [Code runner](#code-runner)
- [Read Eval Print Loop](#read-eval-print-loop)
- [Highlight current symbol](#highlight-current-symbol) - [Highlight current symbol](#highlight-current-symbol)
- [Error handling](#error-handling) - [Error handling](#error-handling)
- [EditorConfig](#editorconfig) - [EditorConfig](#editorconfig)
@ -262,7 +263,6 @@ The local `.SpaceVim.d/` will also be added to the `&runtimepath`.
Please be aware that if there are errors in your `init.toml`, the setting will not be applied. See [FAQ](../faq/#why-are-the-options-in-toml-file-not-applied). Please be aware that if there are errors in your `init.toml`, the setting will not be applied. See [FAQ](../faq/#why-are-the-options-in-toml-file-not-applied).
All SpaceVim options can be found in `:h SpaceVim-options`, All SpaceVim options can be found in `:h SpaceVim-options`,
the key is the same as the option name without the `g:spacevim_` prefix. the key is the same as the option name without the `g:spacevim_` prefix.
@ -2328,7 +2328,7 @@ The default color for iedit is `red`/`green` which is based on the current color
| `Ctrl-h` / `<Backspace>` | delete character before cursor | | `Ctrl-h` / `<Backspace>` | delete character before cursor |
| `<Delete>` | delete character after cursor | | `<Delete>` | delete character after cursor |
### Code runner and REPL ### Code runner
SpaceVim provides an asynchronous code runner plugin. In most language layers, SpaceVim provides an asynchronous code runner plugin. In most language layers,
the key binding `SPC l r` is defined for running the current buffer. the key binding `SPC l r` is defined for running the current buffer.
@ -2339,17 +2339,18 @@ Use `F5` to build the project asynchronously.
nnoremap <silent> <F5> :call SpaceVim#plugins#runner#open('make') nnoremap <silent> <F5> :call SpaceVim#plugins#runner#open('make')
``` ```
The following features have been added to the runner and repl plugins: Key bindings within code runner buffer:
- Run the current file with the default command | key binding | description |
- Run code file through system file explorer, only supported in gvim. | ----------- | --------------------------- |
- Run code per Shebang | `ctrl-c` | stop code runner |
- Stop code running | `i` | open promote to insert text |
- View output in the Output Window
- Set default language to run ### Read Eval Print Loop
- Select language to run
- REPL support The REPL(Read Eval Print Loop) plugin provides a framework to run REPL command asynchronously.
- Run selected code snippet
For different language, you need to checkout the doc of language layer. The repl key bindings are defined in language layer.
### Highlight current symbol ### Highlight current symbol