mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 05:50:05 +08:00
Improve markdown layer
ref: https://github.com/wooorm/remark/issues/281#issuecomment-318073708
This commit is contained in:
parent
32f5057954
commit
244d014073
@ -26,6 +26,12 @@ function! SpaceVim#layers#lang#markdown#config() abort
|
|||||||
if executable('firefox')
|
if executable('firefox')
|
||||||
let g:mkdp_path_to_chrome= get(g:, 'mkdp_path_to_chrome', 'firefox')
|
let g:mkdp_path_to_chrome= get(g:, 'mkdp_path_to_chrome', 'firefox')
|
||||||
endif
|
endif
|
||||||
|
let g:neoformat_enabled_markdown = ['remark']
|
||||||
|
let g:neoformat_markdown_remark = {
|
||||||
|
\ 'exe': 'remark',
|
||||||
|
\ 'args': ['--no-color', '--silent', '--use', 'remark-frontmatter'],
|
||||||
|
\ 'stdin': 1,
|
||||||
|
\ }
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:mappings() abort
|
function! s:mappings() abort
|
||||||
|
@ -4,7 +4,6 @@ title: "SpaceVim lang#java layer"
|
|||||||
|
|
||||||
# [SpaceVim Layers:](https://spacevim.org/layers) lang#java
|
# [SpaceVim Layers:](https://spacevim.org/layers) lang#java
|
||||||
|
|
||||||
|
|
||||||
<!-- vim-markdown-toc GFM -->
|
<!-- vim-markdown-toc GFM -->
|
||||||
* [Description](#description)
|
* [Description](#description)
|
||||||
* [Layer Installation](#layer-installation)
|
* [Layer Installation](#layer-installation)
|
||||||
@ -30,36 +29,35 @@ To use this configuration layer, add `SPLayer 'lang#java'` to your custom config
|
|||||||
|
|
||||||
**Import key bindings:**
|
**Import key bindings:**
|
||||||
|
|
||||||
Key Binding | Description
|
| Key Binding | Description |
|
||||||
-----------| -----------
|
| -------------------- | ------------------------------- |
|
||||||
`F4` (Insert/Normal) | Import class under cursor
|
| `F4` (Insert/Normal) | Import class under cursor |
|
||||||
`SPC l I` | Import missing classes
|
| `SPC l I` | Import missing classes |
|
||||||
`SPC l R` | Remove unused classes
|
| `SPC l R` | Remove unused classes |
|
||||||
`SPC l i` | smart import class under cursor
|
| `SPC l i` | smart import class under cursor |
|
||||||
`<C-j>I` (Insert) | Import missing classes
|
| `<C-j>I` (Insert) | Import missing classes |
|
||||||
`<C-j>R` (Insert) | Remove unused classes
|
| `<C-j>R` (Insert) | Remove unused classes |
|
||||||
`<C-j>i` (Insert) | smart import class under cursor
|
| `<C-j>i` (Insert) | smart import class under cursor |
|
||||||
|
|
||||||
|
|
||||||
**Generate key bindings:**
|
**Generate key bindings:**
|
||||||
|
|
||||||
Mode | Key Binding | Description
|
| Mode | Key Binding | Description |
|
||||||
----- | ------| -----------
|
| ------------- | ----------- | ------------------------------------- |
|
||||||
normal | `SPC l A` | generate accessors
|
| normal | `SPC l A` | generate accessors |
|
||||||
normal/visual | `SPC l s` | generate setter accessor
|
| normal/visual | `SPC l s` | generate setter accessor |
|
||||||
normal/visual | `SPC l g` | generate getter accessor
|
| normal/visual | `SPC l g` | generate getter accessor |
|
||||||
normal/visual | `SPC l a` | generate setter and getter accessor
|
| normal/visual | `SPC l a` | generate setter and getter accessor |
|
||||||
insert | `<c-j>s` | generate setter accessor
|
| insert | `<c-j>s` | generate setter accessor |
|
||||||
insert | `<c-j>g` | generate getter accessor
|
| insert | `<c-j>g` | generate getter accessor |
|
||||||
insert | `<c-j>a` | generate getter and setter accessor
|
| insert | `<c-j>a` | generate getter and setter accessor |
|
||||||
normal | `SPC l t s` | generate toString function
|
| normal | `SPC l t s` | generate toString function |
|
||||||
normal | `SPC l e q` | generate equals and hashcode function
|
| normal | `SPC l e q` | generate equals and hashcode function |
|
||||||
normal | `SPC l c` | generate constructor
|
| normal | `SPC l c` | generate constructor |
|
||||||
normal | `SPC l C` | generate default constructor
|
| normal | `SPC l 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.
|
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.
|
||||||
|
|
||||||
To make neoformat support java file, you should install uncrustify. or
|
To make neoformat support java file, you should install uncrustify. or
|
||||||
download [google's formater jar](https://github.com/google/google-java-format)
|
download [google's formater jar](https://github.com/google/google-java-format)
|
||||||
@ -68,16 +66,15 @@ to SpaceVim custom configuration file.
|
|||||||
|
|
||||||
#### Maven
|
#### Maven
|
||||||
|
|
||||||
Key Binding | Description
|
| Key Binding | Description |
|
||||||
-----------| -----------
|
| ----------- | ------------------------------ |
|
||||||
`SPC l m i` | Run maven clean install
|
| `SPC l m i` | Run maven clean install |
|
||||||
`SPC l m I` | Run maven install
|
| `SPC l m I` | Run maven install |
|
||||||
`SPC l m p` | Run one already goal from list
|
| `SPC l m p` | Run one already goal from list |
|
||||||
`SPC l m r` | Run maven goals
|
| `SPC l m r` | Run maven goals |
|
||||||
`SPC l m R` | Run one maven goal
|
| `SPC l m R` | Run one maven goal |
|
||||||
`SPC l m t` | Run maven test
|
| `SPC l m t` | Run maven test |
|
||||||
|
|
||||||
### Problems buffer
|
### Problems buffer
|
||||||
|
|
||||||
### Project buffer
|
### Project buffer
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user