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

Fix java doc

This commit is contained in:
wsdjeg 2017-12-19 20:22:19 +08:00
parent a24786e20e
commit 4c53a52611

View File

@ -1,6 +1,6 @@
---
title: "SpaceVim lang#java layer"
description: "This layer is for Java development"
description: "This layer is for Java development. All the features such as code completion, formatting, syntax checking, REPL and debug have be done in this layer."
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#java
@ -8,13 +8,15 @@ description: "This layer is for Java development"
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Feature](#feature)
- [Install](#install)
- [Key bindings](#key-bindings)
- [Java language specified key bindings](#java-language-specified-key-bindings)
- [Maven](#maven)
- [Jump](#jump)
- [Problems buffer](#problems-buffer)
- [Project buffer](#project-buffer)
- [Import key bindings](#import-key-bindings)
- [Generate key bindings](#generate-key-bindings)
- [Code formatting](#code-formatting)
- [Maven](#maven)
- [Jump](#jump)
- [Inferior REPL process](#inferior-repl-process)
<!-- vim-markdown-toc -->
@ -22,15 +24,22 @@ description: "This layer is for Java development"
This layer is for Java development.
## Layer Installation
## Feature
- code completion: `autocomplete` layer
- code formatting
- refactoring
- syntax checking: `checkers` layer
- REPL(need java8's jshell)
- debug: check out the `debug` layer
## Install
To use this configuration layer, add `SPLayer 'lang#java'` to your custom configuration file.
## Key bindings
### Java language specified key bindings
**Import key bindings:**
### Import key bindings
| Key Binding | Description |
| -------------------- | ------------------------------- |
@ -42,24 +51,24 @@ To use this configuration layer, add `SPLayer 'lang#java'` to your custom config
| `<C-j>R` (Insert) | Remove unused classes |
| `<C-j>i` (Insert) | smart import class under cursor |
**Generate key bindings:**
### Generate key bindings
| Mode | Key Binding | Description |
| ------------- | ----------- | ------------------------------------- |
| normal | `SPC l A` | generate accessors |
| normal/visual | `SPC l s` | generate setter accessor |
| normal/visual | `SPC l g` | generate getter accessor |
| normal/visual | `SPC l a` | generate setter and getter accessor |
| normal | `SPC l M` | generate abstract methods |
| normal | `SPC l g A` | generate accessors |
| normal/visual | `SPC l g s` | generate setter accessor |
| normal/visual | `SPC l g g` | generate getter accessor |
| normal/visual | `SPC l g a` | generate setter and getter accessor |
| normal | `SPC l g M` | generate abstract methods |
| insert | `<c-j>s` | generate setter accessor |
| insert | `<c-j>g` | generate getter accessor |
| insert | `<c-j>a` | generate getter and setter accessor |
| normal | `SPC l ts` | generate toString function |
| normal | `SPC l eq` | generate equals and hashcode function |
| normal | `SPC l c` | generate constructor |
| normal | `SPC l C` | generate default constructor |
| normal | `SPC l g t` | generate toString function |
| normal | `SPC l g e` | generate equals and hashcode function |
| normal | `SPC l g c` | generate constructor |
| normal | `SPC l g C` | generate default constructor |
**Code formatting:**
### Code formatting
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.
@ -68,7 +77,7 @@ 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.
#### Maven
### Maven
| Key Binding | Description |
| ----------- | ------------------------------ |
@ -79,12 +88,20 @@ to SpaceVim custom configuration file.
| `SPC l m R` | Run one maven goal |
| `SPC l m t` | Run maven test |
#### Jump
### Jump
| Key Binding | Description |
| ----------- | ---------------------- |
| `SPC l j a` | jump to alternate file |
### Problems buffer
### Inferior REPL process
### Project buffer
Start a `jshell` inferior REPL process with `SPC l s i`.
Send code to inferior process commands:
| Key Binding | Description |
| ----------- | ------------------------------------------------ |
| `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 |