mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 01:09:56 +08:00
Add key bindings development doc
This commit is contained in:
parent
2a9033afc1
commit
d427c3f065
@ -21,6 +21,7 @@ description: "Development information about SpaceVim, including contributing gui
|
|||||||
- [Author of a new layer](#author-of-a-new-layer)
|
- [Author of a new layer](#author-of-a-new-layer)
|
||||||
- [Contributor to an existing layer](#contributor-to-an-existing-layer)
|
- [Contributor to an existing layer](#contributor-to-an-existing-layer)
|
||||||
- [Contributing a keybinding](#contributing-a-keybinding)
|
- [Contributing a keybinding](#contributing-a-keybinding)
|
||||||
|
- [Language specified key bindings](#language-specified-key-bindings)
|
||||||
- [Contributing a banner](#contributing-a-banner)
|
- [Contributing a banner](#contributing-a-banner)
|
||||||
- [Build with SpaceVim](#build-with-spacevim)
|
- [Build with SpaceVim](#build-with-spacevim)
|
||||||
- [Changelog](#changelog)
|
- [Changelog](#changelog)
|
||||||
@ -110,6 +111,7 @@ Write commit messages according to adapted [Tim Pope’s guidelines](http://tbag
|
|||||||
|
|
||||||
This is a model commit message:
|
This is a model commit message:
|
||||||
|
|
||||||
|
```gitcommit
|
||||||
Capitalized, short (72 chars or less) summary
|
Capitalized, short (72 chars or less) summary
|
||||||
|
|
||||||
More detailed explanatory text, if necessary. Wrap it to about 72
|
More detailed explanatory text, if necessary. Wrap it to about 72
|
||||||
@ -131,6 +133,7 @@ This is a model commit message:
|
|||||||
single space, with blank lines in between, but conventions vary here
|
single space, with blank lines in between, but conventions vary here
|
||||||
|
|
||||||
- Use a hanging indent
|
- Use a hanging indent
|
||||||
|
```
|
||||||
|
|
||||||
[Gita] provide vim mode for Git commit messages, which helps you to comply to these guidelines.
|
[Gita] provide vim mode for Git commit messages, which helps you to comply to these guidelines.
|
||||||
|
|
||||||
@ -148,13 +151,13 @@ The file header for vim script should look like the following template:
|
|||||||
"=============================================================================
|
"=============================================================================
|
||||||
" FILENAME --- NAME layer file for SpaceVim
|
" FILENAME --- NAME layer file for SpaceVim
|
||||||
" Copyright (c) 2012-2016 Shidong Wang & Contributors
|
" Copyright (c) 2012-2016 Shidong Wang & Contributors
|
||||||
" Author: YOUR_NAME <YOUR_EMAIL>
|
" Author: YOUR NAME <YOUR EMAIL>
|
||||||
" URL: https://spacevim.org
|
" URL: https://spacevim.org
|
||||||
" License: MIT license
|
" License: MIT license
|
||||||
"=============================================================================
|
"=============================================================================
|
||||||
```
|
```
|
||||||
|
|
||||||
You should replace FILENAME by the name of the file (e.g. foo.vim) and NAME by the name of the layer you are creating, don’t forget to replace YOUR_NAME and YOUR_EMAIL also.
|
You should replace FILENAME by the name of the file (e.g. foo.vim) and NAME by the name of the layer you are creating, don’t forget to replace **YOUR NAME** and **YOUR EMAIL** also.
|
||||||
|
|
||||||
##### Author of a new layer
|
##### Author of a new layer
|
||||||
|
|
||||||
@ -228,6 +231,20 @@ If you think it worth contributing a new mappings then be sure to read the docum
|
|||||||
|
|
||||||
ALWAYS document your new mappings or mappings changes inside the relevant documentation file. It should be the the layer file and the [documentation.md](https://spacevim.org/documentation).
|
ALWAYS document your new mappings or mappings changes inside the relevant documentation file. It should be the the layer file and the [documentation.md](https://spacevim.org/documentation).
|
||||||
|
|
||||||
|
#### Language specified key bindings
|
||||||
|
|
||||||
|
All language specified key bindings are started with `SPC l` prefix.
|
||||||
|
|
||||||
|
we recommended to keep same language specified key bindings for different languages:
|
||||||
|
|
||||||
|
| Key Binding | Description |
|
||||||
|
| ----------- | ------------------------------------------------ |
|
||||||
|
| SPC l r | start a runner for current file |
|
||||||
|
| SPC l s i | Start a language specified inferior REPL process |
|
||||||
|
| SPC l s b | send buffer and keep code buffer focused |
|
||||||
|
| SPC l s l | send line and keep code buffer focused |
|
||||||
|
| SPC l s s | send selection text and keep code buffer focused |
|
||||||
|
|
||||||
#### Contributing a banner
|
#### Contributing a banner
|
||||||
|
|
||||||
The startup banner is by default the SpaceVim logo but there are also ASCII banners available in the core/banner layer.
|
The startup banner is by default the SpaceVim logo but there are also ASCII banners available in the core/banner layer.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user