1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 22:40:04 +08:00

add DOC for key mappings for golang layer

This commit is contained in:
Arith Xu 2017-12-19 16:23:46 +08:00
parent e9ab27d943
commit 0cdc5f6f10

View File

@ -23,22 +23,25 @@ To use this configuration layer, add `SPLayer 'lang#go` to your custom configura
## Key bindings ## Key bindings
**Import key bindings:**
| Key Binding | Description | | Key Binding | Description |
| ----------- | ---------------------------------------- | | ----------- | ---------------------------------------- |
| `SPC d l` | launching debugger | | SPC l i | go implements |
| `SPC d c` | Continue the execution | | SPC l f | go info |
| `SPC d b` | Toggle a breakpoint for the current line | | SPC l e | go rename |
| `SPC d B` | Clear all breakpoints | | SPC l r | go run |
| `SPC d o` | step over | | SPC l b | go build |
| `SPC d i` | step into functions | | SPC l t | go test |
| `SPC d O` | step out of current function | | SPC l d | go doc |
| `SPC d e s` | Evaluate and print the selected text | | SPC l v | go doc vertical |
| `SPC d e e` | Evaluate the `<cword>` under the cursor | | SPC l c | go coverage |
| `SPC d e S` | Execute the selected text |
| `SPC d k` | Terminates the debugger |
**Debug Transient State** **Code formatting:**
key bindings is too long? use `SPC d .` to open the debug transient state: the default key bindings for format current buffer is `SPC b f`. and this key bindings is defined in [format layer](<>). you can also use `g=` to indent current buffer.
![Debug Transient State](https://user-images.githubusercontent.com/13142418/33996076-b03c05bc-e0a5-11e7-90fd-5f31e2703d7e.png) To make neoformat support java file, you should install uncrustify. or
download [google's formater jar](https://github.com/google/google-java-format)
and add `let g:spacevim_layer_lang_java_formatter = 'path/to/google-java-format.jar'`
to SpaceVim custom configuration file.