1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 22:50:06 +08:00

Website: update layer page (#1860)

This commit is contained in:
Wang Shidong 2018-06-23 14:37:41 +08:00 committed by GitHub
parent d9324f8c30
commit 3787b35c64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
74 changed files with 1214 additions and 707 deletions

View File

@ -9,6 +9,7 @@ lang: cn
<!-- vim-markdown-toc GFM -->
- [模块介绍](#模块介绍)
- [启用模块](#启用模块)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
@ -21,6 +22,15 @@ lang: cn
- 在左侧栏显示代码改动标记
- 在状态栏显示 vcs 版本信息
## 启用模块
可通过在配置文件内加入如下配置来启用该模块:
```toml
[[layers]]
name = "VersionControl"
```
## 快捷键
| 按键 | 描述 |

View File

@ -9,7 +9,7 @@ lang: cn
<!-- vim-markdown-toc GFM -->
- [模块描述](#模块描述)
- [模块启用](#模块启用)
- [启用模块](#启用模块)
- [模块配置](#模块配置)
- [快捷键设置](#快捷键设置)
- [代码块的设置](#代码块的设置)
@ -30,7 +30,7 @@ lang: cn
代码块自动完成框架默认为[neosnippet](https://github.com/Shougo/neosnippet.vim),可通过
SpaceVim 选项 `snippet_engien` 设置为 ultisnips
## 模块启用
## 启用模块
这一模块是默认启用的,当然为了稳妥,可以再配置文件里加入以下代码块:

View File

@ -7,13 +7,13 @@ description: "chat 模块为 SpaceVim 提供了一个聊天框架,目前支持
<!-- vim-markdown-toc GFM -->
- [模块介绍](#模块介绍)
- [模块描述](#模块描述)
- [启用模块](#启用模块)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## 模块介绍
## 模块描述
chat 模块为 SpaceVim 提供了一个聊天框架,目前支持微信聊天和 QQ 聊天,同时支持自定义聊天服务器。

View File

@ -22,7 +22,12 @@ lang: cn
## 启用模块
checkers 模块默认情况下是启用的。
可通过在配置文件内加入如下配置来启用该模块:
```toml
[[layers]]
name = "checkers"
```
## 模块配置

View File

@ -4,7 +4,7 @@ description: "该模块为中文用户提供了中文的 Vim 帮助文档,同
lang: cn
---
# [可用模块](https://spacevim.org/layers) >> chinese
# [可用模块](../) >> chinese
<!-- vim-markdown-toc GFM -->

View File

@ -4,7 +4,7 @@ description: "colorscheme 模块为 SpaceVim 提供了一系列的常用颜色
lang: cn
---
# [可用模块](https://spacevim.org/layers) >> colorscheme
# [可用模块](../) >> colorscheme
<!-- vim-markdown-toc GFM -->
@ -20,7 +20,7 @@ colorscheme 模块为 SpaceVim 提供了一系列常用的颜色主题,默认
## 启用模块
默认情况下,这一模块并启用,如果需要使用更多的颜色主题,可以启用该模块,在配置
默认情况下,这一模块并启用,如果需要使用更多的颜色主题,可以启用该模块,在配置
文件内加入如下内容:
```toml

View File

@ -4,7 +4,7 @@ description: "cscope 模块为 SpaceVim 他提供了一个智能的 cscope 和 p
lang: cn
---
# [可用模块](../) > cscope
# [可用模块](../) >> cscope
<!-- vim-markdown-toc GFM -->

View File

@ -6,6 +6,15 @@ lang: cn
# [可用模块](../) >> ctrlp
<!-- vim-markdown-toc GFM -->
- [模块介绍](#模块介绍)
- [启用模块](#启用模块)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## 模块介绍
这一模块在 ctrlp 的基础上做了时当的包装和定制,提供了搜索文件、函数列表、

View File

@ -4,12 +4,29 @@ description: "SpaceVim default 模块并不包含插件,但提供了一些更
lang: cn
---
# [SpaceVim Layers:](../) default
# [可用模块](../) >> default
<!-- vim-markdown-toc GFM -->
- [模块描述](#模块描述)
- [启用模块](#启用模块)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## 模块描述
这一模块主要优化了一些 Vim 设置,包含了一些默认的设置选项,和快捷键。
## 启用模块
可通过在配置文件内加入如下配置来启用该模块:
```toml
[[layers]]
name = "default"
```
## 快捷键
一些编辑常用的快捷键

View File

@ -6,6 +6,14 @@ lang: cn
# [可用模块](../) >> denite
<!-- vim-markdown-toc GFM -->
- [模块描述](#模块描述)
- [启用模块](#启用模块)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## 模块描述
提供以 denite 为核心的异步模糊查找机制,支持模糊搜索文件、历史纪录、函数列表等。这一模块需要 Vim

View File

@ -6,6 +6,14 @@ lang: cn
# [可用模块](../) >> fzf
<!-- vim-markdown-toc GFM -->
- [模块介绍](#模块介绍)
- [启用模块](#启用模块)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## 模块介绍
这一模块在 fzf 的基础上做了时当的包装和定制,提供了搜索文件、函数列表、

View File

@ -5,16 +5,18 @@ keywords: layer,layers
lang: cn
---
# 可用模块
<!-- vim-markdown-toc GFM -->
- [什么是模块](#什么是模块)
- [如何启用模块](#如何启用模块)
- [如何禁用模块](#如何禁用模块)
- [模块简介](#模块简介)
- [启用模块](#启用模块)
- [禁用模块](#禁用模块)
- [可用模块](#可用模块)
<!-- vim-markdown-toc -->
## 什么是模块
## 模块简介
SpaceVim 是一个社区驱动的 vim 配置集合,通常一个 Vim 的配置集合包含了诸多的
Vim 插件以及相关配置。而 SpaceVim 是以模块的方式来组织和管理这些插件以及相关
@ -25,7 +27,7 @@ Vim 插件以及相关配置。而 SpaceVim 是以模块的方式来组织和管
间。用户仅仅需要根据自己的实际需求,来启用相关模块。比如,当我需要频繁调用终
端时,可以启用终端支持的 `shell` 模块。
### 如何启用模块
### 启用模块
`shell` 模块为例,启用该模块,并且设定一些模块选项,指定终端打开位置为
顶部,高度 30。
@ -37,7 +39,7 @@ Vim 插件以及相关配置。而 SpaceVim 是以模块的方式来组织和管
default_height = 30
```
### 如何禁用模块
### 禁用模块
在 SpaceVim 内,默认启用了一些模块,当你需要禁用某一个模块时,需要指定模块
选项 `enable` 为 false。`enable` 这一选项缺省为 true所以启用模块时这一
@ -67,7 +69,8 @@ Vim 插件以及相关配置。而 SpaceVim 是以模块的方式来组织和管
| [ctrlp](ctrlp/) | 提供以 ctrlp 为核心的模糊查找机制,支持模糊搜索文件、历史纪录、函数列表等。 |
| [debug](debug/) | 这一模块为 SpaceVim 提供了 debug 的常用功能,采用 vebugger 作为后台框架,支持多种 debug 工具。 |
| [default](default/) | SpaceVim default 模块并不包含插件,但提供了一些更好的默认设置, |
| [denite](denite/) | This layers provide a heavily customized Denite centric work-flow |
| [denite](denite/) | 提供以 denite 为核心的异步模糊查找机制,支持模糊搜索文件、历史纪录、函数列表等。 |
| [fzf](fzf/) | 提供以 fzf 为核心的异步模糊查找机制,支持模糊搜索文件、历史纪录、函数列表等。 |
| [git](git/) | 这一模块为 SpaceVim 提供了 git 支持,根据当前 Vim 版本特性,选择 gina 或者 gita 作为默认的后台 git 插件。 |
| [lang#c](lang/c/) | This layer is for c/c++/object-c development |
| [lang#dart](lang/dart/) | This layer is for dart development, provide autocompletion, syntax checking, code format for dart file. |
@ -85,10 +88,14 @@ Vim 插件以及相关配置。而 SpaceVim 是以模块的方式来组织和管
| [lang#ruby](lang/ruby/) | This layer is for ruby development, provide autocompletion, syntax checking, code format for ruby file. |
| [lang#typescript](lang/typescript/) | This layer is for TypeScript development |
| [lang#vim](lang/vim/) | This layer is for writting vim script, including code completion, syntax checking and buffer formatting |
| [language-server-protocol](language-server-protocol/) | This layers provides language server protocol for vim and neovim |
| [language-server-protocol](language-server-protocol/) | lsp 模块为 SpaceVim 提供 language server protocol 的支持,提供更多语言相关服务 |
| [leaderf](leaderf/) | 提供以 leaderf 为核心的异步模糊查找机制,支持模糊搜索文件、历史纪录、函数列表等。 |
| [shell](shell/) | 这一模块为 SpaceVim 提供了终端集成特性,优化内置终端的使用体验 |
| [tags](tags/) | This layer provide tags manager for project |
| [ui](ui/) | Awesome UI layer for SpaceVim, provide IDE-like UI for neovim and vim in both TUI and GUI |
| [tags](tags/) | tags 模块提供全局的 tags 索引管理,提供快速检索定义和引用的功能。 |
| [tools#dash](tools/dash/) | 该模块提供对 Dash 支持,可快速查找光标位置的单词 |
| [tools](tools/) | 集成多种常用工具,包括日历、计算器、等等多种工具类插件,该模块针对 vim8 以及 neovim 提供了更好的插件选择。 |
| [ui](ui/) | SpaceVim ui 模块提供了一个 IDE-like 的界面,包括状态栏、文件树、语法数等等特性。 |
| [unite](unite/) | 提供以 unite 为核心的模糊查找机制,支持模糊搜索文件、历史纪录、函数列表等。 |
<!-- SpaceVim layer cn list end -->

View File

@ -1,58 +1,53 @@
---
title: "SpaceVim lang#c layer"
description: "This layer is for c/c++/object-c development"
title: "SpaceVim lang#c 模块"
description: "这一模块为 c/c++/object-c 的开发提供了支持,包括代码补全、语法检查等特性。"
lang: cn
---
# [Layers](https://spacevim.org/layers) > lang#c
# [可用模块](../../) >> lang#c
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Features](#features)
- [Configuration](#configuration)
- [模块简介](#模块简介)
- [启用模块](#启用模块)
- [功能特性](#功能特性)
- [模块配置](#模块配置)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## Description
## 模块简介
This layer is for c/c++/object-c development.
这一模块为 c/c++/object-c 的开发提供了支持,包块代码补全、语法检查、格式化等特性。
## Layer Installation
## 启用模块
To use this configuration layer, add `call SpaceVim#layers#load('lang#c')` to your custom configuration file.
可通过在配置文件内加入如下配置来启用该模块:
```vim
call SpaceVim#layers#load('lang#c',
\ {
\ 'enable_libclang' : 1,
\ }
\ )
```toml
[[layers]]
name = "lang#c"
```
## Features
## 功能特性
- code completion
- syntax checking
- formatting
- 代码补全
- 语法检查
- 代码格式化
## 模块配置
## Configuration
- `clang_executable` (字符串)
- `clang_executable` (string)
设置可执行程序 clang 的路径。
set the path to the clang executable
- `libclang_path` (字符串)
- `enable_libclang` (boolean)
设置 libclang 的路径,默认情况下该选项值为空。
use libclang instead of `clang -cc1`, by default it is 0.
- `clang_std` (字典)
- `libclang_path` (string)
The libclang shared object (dynamic library) file path. by default it is empty.
- `clang_std` (dict)
该字典存储编辑不同 c 家族文件类型时所使用的标准库。默认值为:
```json
{
@ -65,4 +60,24 @@ The libclang shared object (dynamic library) file path. by default it is empty.
- `clang_flag`
Create a `.clang` file at your project root. You should be able to just paste most of your compile flags in there. You can also use a list ['-Iwhatever', ...] when loadding this layer.
通常,在项目根目录新建一个 `.clang` 文件,可以将编译参数逐行写入。也可以使用一 List 值来初始化该选项。
例如: `clang_flag = ["-Iwhatever"]`
以下为一个完整的 `lang#c` 模块载入示例:
```toml
[[layers]]
name = "lang#c"
clang_executable = "/usr/bin/clang"
[layer.clang_std]
c = "c11"
cpp = "c++1z"
objc = "c11"
objcpp = "c++1z"
```
## 快捷键
| 按键 | 描述 |
| --------- | ------------------ |
| `SPC l r` | 编译并执行当前文件 |

View File

@ -1,90 +1,96 @@
---
title: "SpaceVim lang#dart layer"
description: "This layer is for dart development, provide autocompletion, syntax checking, code format for dart file."
title: "SpaceVim lang#dart 模块"
description: "这一模块为 dart 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#dart
# [可用模块](../../) >> lang#dart
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Features](#features)
- [Installation](#installation)
- [Layer](#layer)
- [Syntax checking && Code formatting](#syntax-checking--code-formatting)
- [Install dart-repl](#install-dart-repl)
- [Key bindings](#key-bindings)
- [Inferior REPL process](#inferior-repl-process)
- [Running current script](#running-current-script)
- [Code formatting](#code-formatting)
- [Screenshots](#screenshots)
- [模块简介](#模块简介)
- [功能特性](#功能特性)
- [依赖安装及启用模块](#依赖安装及启用模块)
- [启用模块](#启用模块)
- [语法检查及代码格式化](#语法检查及代码格式化)
- [安装 dart-repl](#安装-dart-repl)
- [快捷键](#快捷键)
- [交互式编程](#交互式编程)
- [运行当前脚本](#运行当前脚本)
- [代码格式化](#代码格式化)
- [相关截图](#相关截图)
<!-- vim-markdown-toc -->
## Description
## 模块简介
This layer is for dart development.
这一模块为 SpaceVim 提供了 dart 开发支持,包括代码补全、语法检查、以及代码格式化等特性。
## Features
## 功能特性
- code completion
- syntax checking
- code formatting
- REPL
- code runner
- 代码补全
- 语法检查
- 代码格式化
- 交互式编程
- 异步执行
## Installation
## 依赖安装及启用模块
### Layer
### 启用模块
To use this configuration layer, add `call SpaceVim#layers#load('lang#dart')` to your custom configuration file.
可通过在配置文件内加入如下配置来启用该模块:
### Syntax checking && Code formatting
```toml
[[layers]]
name = "lang#dart"
```
To enable syntax checking and code formatting in spacevim, you need to install [dart sdk](https://github.com/dart-lang/sdk).
### 语法检查及代码格式化
### Install dart-repl
为了在 SpaceVim 中启用 dart 语法检查以及代码格式化,需要安装 [dart sdk](https://github.com/dart-lang/sdk)。
you need to install the dart_repl via pub, pub is a build-in package manager in dart-sdk:
### 安装 dart-repl
需要通过 pub 来安装 `dart_repl` pub 是 dart sdk 内置的包管理器:
```sh
pub global activate dart_repl
```
## Key bindings
## 快捷键
### Inferior REPL process
### 交互式编程
Start a `dart.repl` inferior REPL process with `SPC l s i`.
启动 `dart.repl` 交互进程,快捷键为: `SPC l s i`
Send code to inferior process commands:
将代码传输给 REPL 进程执行:
| 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 |
| 快捷键 | 描述 |
| ----------- | --------------------------- |
| `SPC l s b` | 发送整个文件内容至 REPL |
| `SPC l s l` | 发送当前行内容至 REPL |
| `SPC l s s` | 发送已选中的内容至 REPL |
### Running current script
### 运行当前脚本
To running a ruby script, you can press `SPC l r` to run current file without loss focus, and the result will be shown in a runner buffer.
在编辑 dart 文件是,可通过快捷键 `SPC l r` 快速异步运行当前文件,运行结果会展示在一个独立的执行窗口内。
### Code formatting
### 代码格式化
| Key Binding | Description |
| 快捷键 | 描述 |
| ----------- | --------------------- |
| `SPC b f` | format current buffer |
| `SPC b f` | 格式化当前文件 |
## Screenshots
## 相关截图
**code formatting:**
**代码格式化:**
![format-dart-file-in-spacevim](https://user-images.githubusercontent.com/13142418/34455939-b094db54-ed4f-11e7-9df0-80cf5de1128d.gif)
**auto completion:**
**代码补全:**
![complete-dart-in-spacevim](https://user-images.githubusercontent.com/13142418/34455816-ee77182c-ed4c-11e7-8f63-402849f60405.png)
**code runner:**
**异步执行:**
![dart-runner-in-spacevim](https://user-images.githubusercontent.com/13142418/34455403-1f6d4c3e-ed44-11e7-893f-09a6e64e27ed.png)

View File

@ -1,56 +1,60 @@
---
title: "SpaceVim lang#elixir layer"
description: "This layer is for elixir development, provide autocompletion, syntax checking, code format for elixir file."
title: "SpaceVim lang#elixir 模块"
description: "这一模块为 elixir 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#elixir
# [可用模块](../../) >> lang#elixir
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Features](#features)
- [Install](#install)
- [Layer](#layer)
- [Key bindings](#key-bindings)
- [Inferior REPL process](#inferior-repl-process)
- [Running current script](#running-current-script)
- [模块简介](#模块简介)
- [功能特性](#功能特性)
- [启用模块](#启用模块)
- [快捷键](#快捷键)
- [交互式编程](#交互式编程)
- [运行当前脚本](#运行当前脚本)
<!-- vim-markdown-toc -->
## Description
## 模块简介
This layer is for Elixir development.
这一模块为 SpaceVim 提供了 elixir 开发支持,包括代码补全、语法检查、以及代码格式化等特性。
## Features
## 功能特性
This layer include the plugin [slashmili/alchemist.vim](https://github.com/slashmili/alchemist.vim), which provides:
该模块主要包括插件 [slashmili/alchemist.vim](https://github.com/slashmili/alchemist.vim) 该插件提供:
- Completion for Modules and functions.
- Documentation lookup for Modules and functions.
- Jump to the definition.
- 代码补全
- 文档查询
- 跳转定义处
SpaceVim also provides REPL/Debug support for elixir.
同时,该模块还未 elixir 开发提供了交互式编程和调试等功能。
## Install
## 启用模块
### Layer
可通过在配置文件内加入如下配置来启用该模块:
To use this configuration layer, add `SPLayer 'lang#elixir'` to your custom configuration file.
```toml
[[layers]]
name = "lang#elixir"
```
## Key bindings
### Inferior REPL process
## 快捷键
Start a `iex` inferior REPL process with `SPC l s i`.
### 交互式编程
Send code to inferior process commands:
启动 `iex` 交互进程,快捷键为: `SPC l s i`
| 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 |
将代码传输给 REPL 进程执行:
### Running current script
| 快捷键 | 描述 |
| ----------- | --------------------------- |
| `SPC l s b` | 发送整个文件内容至 REPL |
| `SPC l s l` | 发送当前行内容至 REPL |
| `SPC l s s` | 发送已选中的内容至 REPL |
To running current script, you can press `SPC l r` to run current file without loss focus, and the result will be shown in a runner buffer.
### 运行当前脚本
在编辑 elixir 文件是,可通过快捷键 `SPC l r` 快速异步运行当前文件,运行结果会展示在一个独立的执行窗口内。

View File

@ -1,65 +1,71 @@
---
title: "SpaceVim golang layer"
description: "This layer is for golang development. It also provides additional language-specific key mappings."
title: "SpaceVim lang#go 模块"
description: "这一模块为 go 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) go
# [可用模块](../../) >> lang#go
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Features](#features)
- [Key bindings](#key-bindings)
- [模块简介](#模块简介)
- [启用模块](#启用模块)
- [功能特性](#功能特性)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## Description
## 模块简介
This layer is for golang development. It also provides additional language-specific key mappings.
该模块为 SpaceVim 提供了 golang 开发支持,包括代码补全,格式化,语法检查等特性。同时提供诸多语言专属快捷键。
## Install
## 启用模块
To use this configuration layer, add `call SpaceVim#layers#load('lang#go')` to your custom configuration file.
可通过在配置文件内加入如下配置来启用该模块:
## Features
```toml
[[layers]]
name = "lang#go"
```
- auto-completion
- syntax checking
- goto definition
- refernce finder
## 功能特性
## Key bindings
- 代码补全
- 语法检查
- 跳转定义处
- 查询函数引用
**Import key bindings:**
## 快捷键
| Key Binding | Description |
| ----------- | --------------------------- |
| SPC l a | go alternate |
| SPC l b | go build |
| SPC l c | go coverage |
| SPC l d | go doc |
| SPC l D | go doc vertical |
| SPC l e | go rename |
| SPC l g | go definition |
| SPC l G | go generate |
| SPC l h | go info |
| SPC l i | go implements |
| SPC l I | implement stubs |
| SPC l k | add tags |
| SPC l K | remove tags |
| SPC l l | list declarations in file|
| SPC l m | format improts |
| SPC l M | add import |
| SPC l r | go referrers |
| SPC l s | fill struct |
| SPC l t | go test |
| SPC l v | freevars |
| SPC l x | go run |
**语言专属快捷键:**
**Code formatting:**
| 快捷键 | 描述 |
| --------- | ------------------------- |
| `SPC l a` | go alternate |
| `SPC l b` | go build |
| `SPC l c` | go coverage |
| `SPC l d` | go doc |
| `SPC l D` | go doc vertical |
| `SPC l e` | go rename |
| `SPC l g` | go definition |
| `SPC l G` | go generate |
| `SPC l h` | go info |
| `SPC l i` | go implements |
| `SPC l I` | implement stubs |
| `SPC l k` | add tags |
| `SPC l K` | remove tags |
| `SPC l l` | list declarations in file |
| `SPC l m` | format improts |
| `SPC l M` | add import |
| `SPC l r` | go referrers |
| `SPC l s` | fill struct |
| `SPC l t` | go test |
| `SPC l v` | freevars |
| `SPC l x` | go run |
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 go files, you should have [go-fmt](http://golang.org/cmd/gofmt/) command available, or
install [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports). `go-fmt` is delivered by golang's default installation, so make sure you have correctly setup your go environment.
默认的代码格式化快捷键是 `SPC b f`,该快捷键又 `format` 模块定义,同时也可以通过 `g =` 来对其整个文档。
为了使得 `format` 模块支持 go 文件,需要确认有可执行命令 [go-fmt](http://golang.org/cmd/gofmt/) 或者 [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports)
通常 `go-fmt` 命令为 go 自带的程序,请确认 go 开发环境是否配置正确。

View File

@ -1,31 +1,37 @@
---
title: "SpaceVim lang#javascript layer"
description: "This layer is for haskell development"
title: "SpaceVim lang#haskell 模块"
description: "这一模块为 haskell 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#haskell
# [可用模块](../../) >> lang#haskell
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Features](#features)
- [模块简介](#模块简介)
- [启用模块](#启用模块)
- [功能特性](#功能特性)
<!-- vim-markdown-toc -->
## Description
## 模块简介
This layer is for haskell development.
这一模块为 haskell 开发提供支持,包括代码补全、语法检查、代码格式化等特性。
## Layer Installation
## 启用模块
To use this configuration layer, add `call SpaceVim#layers#load('lang#haskell')` to your custom configuration file.
可通过在配置文件内加入如下配置来启用该模块:
## Features
```toml
[[layers]]
name = "lang#haskell"
```
- auto-completion
- syntax checking
- goto definition
- refernce finder
- language server protocol (need lsp layer)
## 功能特性
- 代码补全
- 语法检查
- 跳转定义处
- 查询函数引用
- lsp 支持

View File

@ -1,46 +1,52 @@
---
title: "SpaceVim lang#html layer"
description: "Edit html in SpaceVim, with this layer, this layer provides code completion, syntax checking and code formatting for html."
title: "SpaceVim lang#html 模块"
description: "这一模块为 html 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#html
# [可用模块](../../) >> lang#html
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Language server](#language-server)
- [Features](#features)
- [Key bindings](#key-bindings)
- [模块描述](#模块描述)
- [启用模块](#启用模块)
- [安装语言服务器](#安装语言服务器)
- [功能特性](#功能特性)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## Description
## 模块描述
This layer adds support for editing HTML and CSS.
这一模块为 html、css 开发提供支持,包括代码补全、语法检查、代码格式化等特性。
## Layer Installation
## 启用模块
To use this configuration layer, add `call SpaceVim#layers#load('lang#html')` to your custom configuration file.
可通过在配置文件内加入如下配置来启用该模块:
### Language server
```toml
[[layers]]
name = "lang#html"
```
To install the language server, you need `npm` on your machine:
### 安装语言服务器
通过 `npm` 安装 html 的语言服务器,配合 lsp 模块提供代码补全等特性。
```bash
npm install --global vscode-html-languageserver-bin
```
## Features
## 功能特性
- Generate HTML and CSS coding using [neosnippet](https://github.com/Shougo/neosnippet.vim/) and [emmet-vim](https://github.com/mattn/emmet-vim)
- Tags navigation on key % using matchit.vim
- auto-completion
- syntax checking
- language server protocol (need `lsp` layer)
- 通过[neosnippet](https://github.com/Shougo/neosnippet.vim/) 和 [emmet-vim](https://github.com/mattn/emmet-vim) 自动生成 HTML、CSS 代码块
- 标签对跳转
- 代码补全
- 语法检查
- lsp 支持
## Key bindings
## 快捷键
| key bindings | Description |
| ------------ | ------------ |
| `<C-e>` | emmet prefix |
| 快捷键 | 描述 |
| ------- | ------------ |
| `<C-e>` | emmet 前缀键 |

View File

@ -1,81 +1,90 @@
---
title: "SpaceVim lang#java layer"
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."
title: "SpaceVim lang#java 模块"
description: "这一模块为 java 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#java
# [可用模块](../../) >> lang#java
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Feature](#feature)
- [Install](#install)
- [Key bindings](#key-bindings)
- [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 -->
## Description
## 模块描述
This layer is for Java development.
这一模块为 java 开发提供支持,包括代码补全、语法检查、代码格式化等特性。
## Feature
## 功能特性
- code completion: `autocomplete` layer
- code formatting
- refactoring
- syntax checking: `checkers` layer
- REPL(need java8's jshell)
- debug: check out the `debug` layer
- 代码补全
- 代码格式化
- 重构
- 语法检查
- 交互式编程:需要 java8 的 jshell
- 调试
## Install
## 启用模块
To use this configuration layer, add `SPLayer 'lang#java'` to your custom configuration file.
可通过在配置文件内加入如下配置来启用该模块:
## Key bindings
```toml
[[layers]]
name = "lang#java"
```
### Import key bindings
## 快捷键
| Key Binding | Description |
| -------------------- | ------------------------------- |
| `F4` (Insert/Normal) | Import class under cursor |
| `SPC l I` | Import missing classes |
| `SPC l R` | Remove unused classes |
| `SPC l i` | smart import class under cursor |
| `<C-j>I` (Insert) | Import missing classes |
| `<C-j>R` (Insert) | Remove unused classes |
| `<C-j>i` (Insert) | smart import class under cursor |
### 导包相关快捷键
### Generate key bindings
| 模式 | 快捷键 | 按键描述 |
| ------------- | --------- | ------------------ |
| Insert/Normal | `F4` | 导入光标下的类 |
| Normal | `SPC l I` | 导入所有缺失的类 |
| Normal | `SPC l R` | 删除多余的导包 |
| Normal | `SPC l i` | 智能导入光标下的类 |
| Insert | `<C-j>I` | 导入所有缺失的类 |
| Insert | `<C-j>R` | 删除多余的导包 |
| Insert | `<C-j>i` | 智能导入光标下的类 |
| Mode | Key Binding | Description |
### 代码生成相关快捷键
| 模式 | 快捷键 | 按键描述 |
| ------------- | ----------- | ------------------------------------- |
| 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 |
| 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 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 |
| 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
### 代码格式化
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.
默认的代码格式化快捷键是 `SPC b f`,该快捷键又 `format` 模块定义,同时也可以通过 `g =` 来对其整个文档。
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.
为了使 format 模块支持 java 文件,需要安装 uncrustify 或者下载 [google's formater jar](https://github.com/google/google-java-format)。
同时,需要设置 `layer_lang_java_formatter` SpaceVim 选项:
```toml
[options]
layer_lang_java_formatter = "path/to/google-java-format.jar"
```
### Maven
@ -94,14 +103,14 @@ to SpaceVim custom configuration file.
| ----------- | ---------------------- |
| `SPC l j a` | jump to alternate file |
### Inferior REPL process
### 交互式编程
Start a `jshell` inferior REPL process with `SPC l s i`.
启动 `jshell` 交互进程,快捷键为: `SPC l s i`
Send code to inferior process commands:
将代码传输给 REPL 进程执行:
| 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 |
| 快捷键 | 描述 |
| ----------- | --------------------------- |
| `SPC l s b` | 发送整个文件内容至 REPL |
| `SPC l s l` | 发送当前行内容至 REPL |
| `SPC l s s` | 发送已选中的内容至 REPL |

View File

@ -1,77 +1,73 @@
---
title: "SpaceVim lang#javascript layer"
description: "This layer is for JaveScript development"
title: "SpaceVim lang#javascript 模块"
description: "这一模块为 javascript 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#javascript
# [可用模块](../../) >> lang#javascript
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Features](#features)
- [Layer configuration](#layer-configuration)
- [Key bindings](#key-bindings)
- [Import key bindings](#import-key-bindings)
- [Generate key bindings](#generate-key-bindings)
- [模块简介](#模块简介)
- [启用模块](#启用模块)
- [功能特性](#功能特性)
- [模块配置](#模块配置)
- [快捷键](#快捷键)
- [导包相关快捷键](#导包相关快捷键)
- [常规快捷键](#常规快捷键)
<!-- vim-markdown-toc -->
## Description
## 模块简介
This layer is for JavaScript development.
这一模块为 SpaceVim 提供了 javascript 开发支持,包括代码补全、语法检查、以及代码格式化等特性。
## Install
## 启用模块
To use this configuration layer, add `call SpaceVim#layers#load('lang#javascript')` to your custom configuration file.
## Features
- auto-completion
- syntax checking
- goto definition
- refernce finder
## Layer configuration
`auto_fix`: auto fix problems when save files, disabled by default. If you need this feature, you can load this layer via:
```vim
call SpaceVim#layers#load('lang#javascript',
\ {
\ 'auto_fix' : 1,
\ }
\ )
可通过在配置文件内加入如下配置来启用该模块:
```toml
[[layers]]
name = "lang#javascript"
```
`enable_flow_syntax`: Enable configuration for [flow](https://flow.org/), disabled by default. If you need this feature, you can load this layer via:
## 功能特性
```vim
call SpaceVim#layers#load('lang#javascript',
\ {
\ 'enable_flow_syntax' : 1,
\ }
\ )
- 代码补全
- 语法检查
- 跳转定义处
- 查询函数引用
## 模块配置
- `auto_fix`:保存文件时,自动修复代码问题,默认未启用该功能,若需要该功能,可在载入模块时设置该选项为 `true`
- `enable_flow_syntax`: 启用/禁用 [flow](https://flow.org/) 语法高亮,默认未启用。
配置示例:
```toml
[[layers]]
name = "lang#javascript"
auto_fix = true
enable_flow_syntax = true
```
## Key bindings
## 快捷键
### Import key bindings
### 导包相关快捷键
| Key Binding | Description |
| -------------------- | ------------------------------- |
| `F4` (Insert/Normal) | Import symbol under cursor |
| `SPC j i` | Import symbol under cursor |
| `SPC j f` | Import missing symbols |
| `SPC j g` | Jump to module under cursor |
| `<C-j>i` (Insert) | Import symbol under cursor |
| `<C-j>f` (Insert) | Import missing symbols |
| `<C-j>g` (Insert) | Jump to module under cursor |
| 模式 | 快捷键 | 按键描述 |
| ------------- | --------- | ------------------ |
| Insert/Normal | `F4` | 导入光标下的类 |
| Normal | `SPC l I` | 导入所有缺失的类 |
| Normal | `SPC l R` | 删除多余的导包 |
| Normal | `SPC l i` | 智能导入光标下的类 |
| Insert | `<C-j>I` | 导入所有缺失的类 |
| Insert | `<C-j>R` | 删除多余的导包 |
| Insert | `<C-j>i` | 智能导入光标下的类 |
### Generate key bindings
### 常规快捷键
| Mode | Key Binding | Description |
| ------------- | ----------- | ------------------------------------- |
| normal | `SPC l g d` | Generate JSDoc |
| 模式 | 快捷键 | 按键描述 |
| ------ | ----------- | ---------- |
| normal | `SPC l g d` | 生成 JSDoc |

View File

@ -1,19 +1,39 @@
# [Layers](https://spacevim.org/layers) > lang#lisp
---
title: "SpaceVim lang#lisp 模块"
description: "这一模块为 lisp 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
---
This layer is for lisp development.
# [可用模块](../../) >> lang#lisp
## Install
<!-- vim-markdown-toc GFM -->
To include this layer, add `SPLayer 'lang#lisp'` to your custom configuration file.
- [模块简介](#模块简介)
- [启用模块](#启用模块)
- [环境依赖](#环境依赖)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## Requirement
## 模块简介
这一模块为 SpaceVim 提供了 lisp 开发支持,包括代码补全、语法检查、以及代码格式化等特性。
## 启用模块
可通过在配置文件内加入如下配置来启用该模块:
```toml
[[layers]]
name = "lang#lisp"
```
## 环境依赖
- Vim 8.0+ with +channel, or Neovim 0.2.0+ with ncat
- ASDF
- Quicklisp
- An Internet connection to install other dependencies from Quicklisp
## mappings
## 快捷键
all the language special mappings is begin with `[SPC] l`, please checkout it in mapping guide.

View File

@ -1,60 +1,54 @@
---
title: "SpaceVim lang#lua layer"
description: "This layer is for lua development, provide autocompletion, syntax checking, code format for lua file."
title: "SpaceVim lang#lua 模块"
description: "这一模块为 lua 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#lua
# [可用模块](../../) >> lang#lua
<!-- vim-markdown-toc GFM -->
* [Description](#description)
* [Installation](#installation)
* [Layer](#layer)
* [Syntax checking && Code formatting](#syntax-checking--code-formatting)
* [Key bindings](#key-bindings)
* [Inferior REPL process](#inferior-repl-process)
* [Running current script](#running-current-script)
- [模块简介](#模块简介)
- [启用模块](#启用模块)
- [快捷键](#快捷键)
- [交互式编程](#交互式编程)
- [运行当前脚本](#运行当前脚本)
<!-- vim-markdown-toc -->
## Description
## 模块简介
This layer is for lua development.
这一模块为在 SpaceVim 中进行 lua 开发提供了支持,包括代码补全、语法检查、代码格式化、交互式编程以及调试等特性。
## Installation
## 启用模块
### Layer
可通过在配置文件内加入如下配置来启用该模块:
To use this configuration layer, add `SPLayer 'lang#lua'` to your custom configuration file.
### Syntax checking && Code formatting
## Key bindings
### Inferior REPL process
Start a `lua` or `luap` inferior REPL process with `SPC l s i`. You may change the REPL command by layer option `repl_command`. For example, if you want to use `lua.repl`, load this layer via:
```vim
call SpaceVim#layers#load('lang#lua'
\ {
\ 'repl_command' : '~/.luarocks/lib/luarocks/rocks-5.3/luarepl/0.8-1/bin/rep.lua',
\ }
```toml
[[layers]]
name = "lang#lua"
```
Send code to inferior process commands:
## 快捷键
| Key Binding | Description |
| ----------- | ------------------------------------------------ |
| `SPC l b` | compile current lua buffer |
| `SPC l r` | run current lua file |
| `SPC l f` | format current lua file |
| `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 |
### 交互式编程
启动 `lua` 或者 `luap` 交互进程,快捷键为: `SPC l s i`。若使用 `luap`,需要在载入模块时设置 `repl_command` 选项:
### Running current script
```toml
[[layers]]
name = "lang#lua"
repl_command = "~/.luarocks/lib/luarocks/rocks-5.3/luarepl/0.8-1/bin/rep.lua"
```
To running a ruby script, you can press `SPC l r` to run current file without loss focus, and the result will be shown in a runner buffer.
将代码传输给 REPL 进程执行:
| 快捷键 | 描述 |
| ----------- | --------------------------- |
| `SPC l s b` | 发送整个文件内容至 REPL |
| `SPC l s l` | 发送当前行内容至 REPL |
| `SPC l s s` | 发送已选中的内容至 REPL |
### 运行当前脚本
在编辑 lua 文件是,可通过快捷键 `SPC l r` 快速异步运行当前文件,运行结果会展示在一个独立的执行窗口内。

View File

@ -1,31 +1,37 @@
---
title: "SpaceVim lang#markdown layer"
description: "Edit markdown within vim, autopreview markdown in the default browser, with this layer you can also format markdown file."
title: "SpaceVim lang#markdown 模块"
description: "这一模块为 markdown 编辑提供支持,包括格式化、自动生成文章目录、代码块等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#markdown
# [可用模块](../../) >> lang#markdown
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [formatting](#formatting)
- [options](#options)
- [Key bindings](#key-bindings)
- [模块简介](#模块简介)
- [启用模块](#启用模块)
- [代码格式化](#代码格式化)
- [模块设置](#模块设置)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## Description
## 模块简介
This layer is for editing markdown file.
这一模块为 SpaceVim 提供 markdown 编辑支持,包括格式化、实时预览、自动生成 TOC 等特性。
## Layer Installation
## 启用模块
To use this configuration layer, add `call SpaceVim#layers#load('lang#markdown')` to your custom configuration file.
可通过在配置文件内加入如下配置来启用该模块:
## formatting
```toml
[[layers]]
name = "lang#markdown"
```
SpaceVim use remark to formatting markdown file, so you need to install this program. you can install it via npm:
## 代码格式化
SpaceVim 默认使用 remark 来格式化 markdown 文件,因此需要安装该命令,可通过如下命令来安装:
```sh
npm -g install remark
@ -33,29 +39,28 @@ npm -g install remark-cli
npm -g install remark-stringify
```
### options
## 模块设置
**listItemIndent**
How to indent the content from list items (`tab`, `mixed` or 1 , default: 1).
设置有序列表对其方式 (`tab`, `mixed` 或者 1 , 默认: 1).
- `'tab'`: use tab stops (4 spaces)
- `'1'`: use one space
- `'tab'`: 使用 tab stops 对其
- `'1'`: 使用空格对其
- `'mixed'`: use `1` for tight and `tab` for loose list items
**enableWcwidth**
Enable/Disable wcwidth for detecting the length of a table cell, default is 0. To enable this option, you need to install [wcwidth](https://www.npmjs.com/package/wcwidth)
启用/禁用表格字符宽度检测,默认未启用该功能。若需要启用该功能,需要额外安装 [wcwidth](https://www.npmjs.com/package/wcwidth)
**listItemChar**
Bullet marker to use for list items (`'-'`, `'*'`, or `'+'`, default: `'-'`).
设置无序列表前缀 (`'-'`, `'*'`, or `'+'`, default: `'-'`).
## 快捷键
## Key bindings
| Key | mode | description |
| 快捷键 | 模式 | 按键描述 |
| ---------- | ------ | -------------------------- |
| `SPC b f` | Normal | Format current buffer |
| `SPC l ft` | Normal | Format table under cursor |
| `SPC l p` | Normal | Real-time markdown preview |
| `SPC b f` | Normal | 格式化当前文件 |
| `SPC l ft` | Normal | 格式化光标处的表格 |
| `SPC l p` | Normal | 通过浏览器实时预览当前文件 |

View File

@ -1,36 +1,42 @@
---
title: "SpaceVim lang#php layer"
description: "This layer adds PHP language support to SpaceVim"
title: "SpaceVim lang#php 模块"
description: "这一模块为 php 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#php
# [可用模块](../../) >> lang#php
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Features](#features)
- [Layer Installation](#layer-installation)
- [Requirement](#requirement)
- [模块简介](#模块简介)
- [功能特性](#功能特性)
- [启用模块](#启用模块)
- [环境依赖](#环境依赖)
<!-- vim-markdown-toc -->
## Description
## 模块简介
This layer adds PHP language support to SpaceVim.
这一模块为在 SpaceVim 中进行 php 开发提供了支持,包括代码补全、语法检查、代码格式化、交互式编程以及调试等特性。
## Features
## 功能特性
- auto-completion
- syntax checking
- goto definition
- refernce finder
- lsp support (require [lsp](https://spacevim.org/layers/language-server-protocol/) layer)
- 代码补全
- 语法检查
- 跳转定义处
- 查询函数引用
- lsp 支持
## Layer Installation
## 启用模块
To use this configuration layer, add `call SpaceVim#layers#load('lang#php')` to your custom configuration file.
可通过在配置文件内加入如下配置来启用该模块:
### Requirement
```toml
[[layers]]
name = "lang#php"
```
### 环境依赖
1. [PHP 5.3+](http://php.net/)
2. [PCNTL](http://php.net/manual/en/book.pcntl.php) Extension

View File

@ -1,102 +1,117 @@
---
title: "SpaceVim lang#python layer"
description: "This layer is for Python development, provide autocompletion, syntax checking, code format for python file."
title: "SpaceVim lang#python 模块"
description: "这一模块为 python 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#python
# [可用模块](../../) >> lang#python
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Features](#features)
- [Install](#install)
- [Layer](#layer)
- [Syntax Checking](#syntax-checking)
- [Buffer formatting](#buffer-formatting)
- [Format imports](#format-imports)
- [Key bindings](#key-bindings)
- [Code generation](#code-generation)
- [Inferior REPL process](#inferior-repl-process)
- [Running current script](#running-current-script)
- [Testing](#testing)
- [Refactoring](#refactoring)
- [模块简介](#模块简介)
- [功能特性](#功能特性)
- [依赖安装及启用模块](#依赖安装及启用模块)
- [启用模块](#启用模块)
- [语法检查](#语法检查)
- [代码格式化](#代码格式化)
- [格式化 imports](#格式化-imports)
- [快捷键](#快捷键)
- [跳至定义处](#跳至定义处)
- [代码生成](#代码生成)
- [交互式编程](#交互式编程)
- [运行当前脚本](#运行当前脚本)
- [整理 Imports](#整理-imports)
<!-- vim-markdown-toc -->
## Description
## 模块简介
This layer is for Python development.
这一模块为在 SpaceVim 中进行 python 开发提供了支持,包括代码补全、语法检查、代码格式化、交互式编程以及调试等特性。
## Features
## 功能特性
- Aoto-completion using [deoplete-jedi](https://github.com/zchee/deoplete-jedi) or [jedi-vim](https://github.com/davidhalter/jedi-vim)
- Documentation Lookup using [jedi-vim](https://github.com/davidhalter/jedi-vim)
- 代码补全
- 文档查阅
- 语法检查
- 代码格式化
- 交互式编程
- 代码调试
## Install
## 依赖安装及启用模块
### Layer
### 启用模块
To use this configuration layer, add `SPLayer 'lang#python'` to your custom configuration file.
可通过在配置文件内加入如下配置来启用该模块:
### Syntax Checking
```toml
[[layers]]
name = "lang#python"
```
`checker` layer provide syntax checking feature, and for python it uses `flake8` package:
### 语法检查
`checkers` 模块提供了代码检查功能, 此外需要安装 `flake8` 包:
```sh
pip install --user flake8
```
### Buffer formatting
### 代码格式化
The default key binding for formatting buffer is `SPC b f`, and you need to install `yapf`. To enable automatic buffer formatting on save, load this layer with setting `format-on-save` to `1`.
默认的代码格式化快捷键为 `SPC b f` 需要安装 `yapf`。若需要在保存文件是自动格式化该 python 文件,需要设置 `format-on-save``true`
```sh
pip install --user yapf
```
### Format imports
### 格式化 imports
To be able to suppress unused imports easily, install [autoflake](https://github.com/myint/autoflake):
若需要更便捷地删除未使用的 imports需要安装 [autoflake](https://github.com/myint/autoflake)
```sh
pip install --user autoflake
```
To be able to sort your imports, install [isort](https://github.com/timothycrosley/isort)
通过安装 [isort](https://github.com/timothycrosley/isort) 可快速对 imports 进行排序:
```sh
pip install --user isort
```
## Key bindings
## 快捷键
### Code generation
### 跳至定义处
| Mode | Key Binding | Description |
| ------ | ----------- | ------------------------------------- |
| normal | `SPC l g d` | Generate docstring |
| 模式 | 按键 | 描述 |
| ------ | ----- | -------------------- |
| Normal | `g d` | 跳至光标函数的定义处 |
### Inferior REPL process
### 代码生成
Start a Python or iPython inferior REPL process with `SPC l s i`. If `ipython` is available in system executable search paths, `ipython` will be used to launch python shell; otherwise, default `python` interpreter will be used. You may change your system executable search path by activating a virtual environment.
| 模式 | 快捷键 | 按键描述 |
| ------ | ----------- | -------------- |
| Normal | `SPC l g d` | 生成 docstring |
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 |
启动 `python``ipython` 交互进程,快捷键为: `SPC l s i`。如果存在可执行命令 `ipython`
则使用该命令为默认的交互式命令;否则则使用默认的 `python` 命令。可通过设置虚拟环境来修改可执行命令。
### Running current script
将代码传输给 REPL 进程执行:
To running a python script, you can press `SPC l r` to run current file without loss focus, and the result will be shown in a runner buffer.
| 快捷键 | 描述 |
| ----------- | ----------------------- |
| `SPC l s b` | 发送整个文件内容至 REPL |
| `SPC l s l` | 发送当前行内容至 REPL |
| `SPC l s s` | 发送已选中的内容至 REPL |
### Testing
### 运行当前脚本
### Refactoring
在编辑 python 文件是,可通过快捷键 `SPC l r` 快速异步运行当前文件,运行结果会展示在一个独立的执行窗口内。
| Key Binding | Description |
| ----------- | ------------------------------------ |
| `SPC l i r` | remove unused imports with autoflake |
| `SPC l i s` | sort imports with isort |
### 整理 Imports
| 快捷键 | 按键描述 |
| ----------- | ------------------------------- |
| `SPC l i r` | 使用 autoflake 移除未使用的导包 |
| `SPC l i s` | 使用 isort 对导包进行排序 |

View File

@ -1,62 +1,67 @@
---
title: "SpaceVim lang#ruby layer"
description: "This layer is for ruby development, provide autocompletion, syntax checking, code format for ruby file."
title: "SpaceVim lang#ruby 模块"
description: "这一模块为 ruby 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#ruby
# [可用模块](../../) >> lang#ruby
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Installation](#installation)
- [Layer](#layer)
- [Syntax checking && Code formatting](#syntax-checking--code-formatting)
- [Key bindings](#key-bindings)
- [Inferior REPL process](#inferior-repl-process)
- [模块描述](#模块描述)
- [依赖安装及启用模块](#依赖安装及启用模块)
- [启用模块](#启用模块)
- [依赖安装](#依赖安装)
- [快捷键](#快捷键)
- [交互式编程](#交互式编程)
- [RuboCop](#rubocop)
- [Running current script](#running-current-script)
- [运行当前脚本](#运行当前脚本)
<!-- vim-markdown-toc -->
## Description
## 模块描述
This layer is for ruby development.
这一模块为 SpaceVim 提供了 ruby 开发支持,包括代码补全、语法检查、以及代码格式化等特性。
## Installation
## 依赖安装及启用模块
### Layer
### 启用模块
To use this configuration layer, add `SPLayer 'lang#ruby'` to your custom configuration file.
可通过在配置文件内加入如下配置来启用该模块:
### Syntax checking && Code formatting
```toml
[[layers]]
name = "lang#ruby"
```
To enable syntax checking and code formatting in spacevim, you need to install [cobocop](https://github.com/bbatsov/rubocop).
### 依赖安装
为了启用 ruby 语法检查和代码格式化,需要安装 [cobocop](https://github.com/bbatsov/rubocop).
```sh
gem install rubocop
```
## 快捷键
## Key bindings
### 交互式编程
### Inferior REPL process
启动 `irb` 交互进程,快捷键为: `SPC l s i`
Start a `irb` inferior REPL process with `SPC l s i`.
将代码传输给 REPL 进程执行:
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 |
| 快捷键 | 描述 |
| ----------- | ----------------------- |
| `SPC l s b` | 发送整个文件内容至 REPL |
| `SPC l s l` | 发送当前行内容至 REPL |
| `SPC l s s` | 发送已选中的内容至 REPL |
### RuboCop
| Key Binding | Description |
| ----------- | ------------------------------------------ |
| `SPC l c f` | Runs RuboCop on the currently visited file |
| 快捷键 | 按键描述 |
| ----------- | ------------------------- |
| `SPC l c f` | 使用 RuboCop 处理当前文件 |
### Running current script
### 运行当前脚本
To running a ruby script, you can press `SPC l r` to run current file without loss focus, and the result will be shown in a runner buffer.
在编辑 ruby 文件是,可通过快捷键 `SPC l r` 快速异步运行当前文件,运行结果会展示在一个独立的执行窗口内。

View File

@ -1,40 +1,48 @@
---
title: "SpaceVim lang#typescript layer"
description: "This layer is for TypeScript development"
title: "SpaceVim lang#typescript 模块"
description: "这一模块为 typescript 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#typescript
# [可用模块](../../) >> lang#typescript
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Features](#features)
- [Layer configuration](#layer-configuration)
- [模块简介](#模块简介)
- [启用模块](#启用模块)
- [功能特性](#功能特性)
- [模块配置](#模块配置)
<!-- vim-markdown-toc -->
## Description
## 模块简介
This layer is for TypeScript development.
这一模块为 SpaceVim 提供了 typescript 开发支持,包括代码补全、语法检查、以及代码格式化等特性。
## Layer Installation
## 启用模块
To use this configuration layer, add `call SpaceVim#layers#load('lang#typescript')` to your custom configuration file. BTW, you need to install TypeScript via:
可通过在配置文件内加入如下配置来启用该模块:
```toml
[[layers]]
name = "lang#typescript"
```
同时,需要通过以下命令安装 TypeScript
```sh
npm install -g typescript
```
## Features
## 功能特性
- auto-completion
- syntax checking
- viewing documentation
- type-signature
- goto definition
- refernce finder
- 代码补全
- 语法检查
- 查阅文档
- 类型图标标记
- 跳至定义处
- 查询函数引用
## Layer configuration
## 模块配置
`typescript_server_path`: set the path of the tsserver.
`typescript_server_path`: 该模块选项可以设置 tsserver 的路径。

View File

@ -1,29 +1,35 @@
---
title: "SpaceVim lang#vim layer"
description: "This layer is for writting vim script, including code completion, syntax checking and buffer formatting"
title: "SpaceVim lang#vim 模块"
description: "这一模块为 vim script 开发提供支持,包括代码补全、语法检查、代码格式化等特性。"
lang: cn
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#vim
# [可用模块](../../) >> lang#vim
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Key bindings](#key-bindings)
- [模块简介](#模块简介)
- [启用模块](#启用模块)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## Description
## 模块简介
This layer is for vim plugin development.
该模块主要为 Vim 脚本编辑提供支持,包括代码补全,语法检查等特性。
## Layer Installation
## 启用模块
To use this configuration layer, add `call SpaceVim#layers#load('lang#vim')` to your custom configuration file.
可通过在配置文件内加入如下配置来启用该模块:
## Key bindings
```toml
[[layers]]
name = "lang#vim"
```
| Key Binding | Description |
| ----------- | ----------------------------------------- |
| `SPC l e` | print the eval under the cursor |
| `SPC l v` | print the helpfulversion under the cursor |
## 快捷键
| 快捷键 | 按键描述 |
| --------- | ------------------------ |
| `SPC l e` | 打印光标下函数值 |
| `SPC l v` | 打印光标下函数的版本信息 |

View File

@ -6,6 +6,14 @@ lang: cn
# [可用模块](../) >> leaderf
<!-- vim-markdown-toc GFM -->
- [模块介绍](#模块介绍)
- [启用模块](#启用模块)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## 模块介绍
这一模块在 leaderf 的基础上做了时当的包装和定制,提供了搜索文件、函数列表、

View File

@ -1,26 +1,27 @@
---
title: "SpaceVim shell 模块"
description: "这一模块为 SpaceVim 提供了终端集成特性,优化内置终端的使用体验"
lang: cn
---
# [SpaceVim Layers:](../) shell
# [可用模块](../) >> shell
<!-- vim-markdown-toc GFM -->
- [描述](#描述)
- [安装](#安装)
- [配置](#配置)
- [模块描述](#模块描述)
- [启用模块](#启用模块)
- [模块配置](#模块配置)
- [设置默认 shell](#设置默认-shell)
- [设置终端打开位置及高度](#设置终端打开位置及高度)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## 描述
## 模块描述
这一模块为 SpaceVim 提供了 shell 集成,根据当前 vim/neovim 的版本,优化自带的内置终端。
## 安装
## 启用模块
如果需要启用该模块,需要在 SpaceVim 的配置文件内添加如下代码:
@ -29,7 +30,7 @@ description: "这一模块为 SpaceVim 提供了终端集成特性,优化内
name = "shell"
```
## 配置
## 模块配置
### 设置默认 shell

View File

@ -7,13 +7,13 @@ description: "集成多种常用工具,包括日历、计算器、等等多种
<!-- vim-markdown-toc GFM -->
- [模块](#模块)
- [模块介](#模块介)
- [启用模块](#启用模块)
- [Commands](#commands)
<!-- vim-markdown-toc -->
## 模块介
## 模块
这一模块集成了多种工具类的 Vim 插件,这些插件都可用通过命令来调用,
并且这些插件的载入方式都是按需载入,只有首次执行相关命令时,

View File

@ -9,6 +9,7 @@ lang: cn
<!-- vim-markdown-toc GFM -->
- [模块描述](#模块描述)
- [启用模块](#启用模块)
- [集成插件](#集成插件)
<!-- vim-markdown-toc -->
@ -17,6 +18,15 @@ lang: cn
SpaceVim ui 模块提供了一个 IDE-like 的界面,包括状态栏、文件树、语法数等等特性。
## 启用模块
可通过在配置文件内加入如下配置来启用该模块:
```toml
[[layers]]
name = "ui"
```
## 集成插件
- [mhinz/vim-startify](https://github.com/mhinz/vim-startify)

View File

@ -6,7 +6,15 @@ lang: cn
# [可用模块](../) >> unite
## 模块介绍
<!-- vim-markdown-toc GFM -->
- [模块简介](#模块简介)
- [启用模块](#启用模块)
- [快捷键](#快捷键)
<!-- vim-markdown-toc -->
## 模块简介
这一模块在 unite 的基础上做了时当的包装和定制,提供了搜索文件、函数列表、
命令历史等等特性。

View File

@ -3,17 +3,18 @@ title: "SpaceVim VersionControl layer"
description: "This layers provides general version control feature for vim. It should work with all VC backends such as Git, Mercurial, Bazaar, SVN, etc…"
---
# [SpaceVim Layers:](https://spacevim.org/layers) VersionControl
# [Available Layers](../) >> VersionControl
<!-- vim-markdown-toc GFM -->
- [Intro](#intro)
- [Description](#description)
- [Features](#features)
- [Install](#install)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Intro
## Description
This layer provides general function for version control. It should work with all VC backends such as Git, Mercurial, Bazaar, SVN, etc…
@ -22,6 +23,16 @@ description: "This layers provides general version control feature for vim. It s
- Show a diff using Vim its sign column
- Show vcs info on statusline
## Install
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "VersionControl"
```
## Key bindings
| Key Binding | Description |

View File

@ -3,7 +3,7 @@ title: "SpaceVim autocomplete layer"
description: "Autocomplete code within SpaceVim, fuzzy find the candidates from multiple completion sources, expand snippet before cursor automatically"
---
# [SpaceVim Layers:](../) autocomplete
# [Available Layers](../) >> autocomplete
<!-- vim-markdown-toc GFM -->
@ -35,10 +35,11 @@ Snippets are supported via [neosnippet](https://github.com/Shougo/neosnippet.vim
## Install
To use this configuration layer, add it to your custom configuration file.
To use this configuration layer, add following snippet to your custom configuration file.
```vim
call SpaceVim#layers#load('autocomplete')
```toml
[[layers]]
name = "autocomplete"
```
## Configuration

View File

@ -3,16 +3,29 @@ title: "SpaceVim chat layer"
description: "SpaceVim chatting layer provide chatting with qq and weixin in vim."
---
# [Layers](../) > chat
# [Available Layers](../) >> chat
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Key Mappings](#key-mappings)
<!-- vim-markdown-toc -->
## Description
SpaceVim chatting layer provide chatting feature in vim.
## plugins
## Install
To use this configuration layer, add following snippet to your custom configuration file.
Name | Description
----- | ------------------
[vim-chat](https://github.com/vim-chat/vim-chat) | chatting in vim.
```toml
[[layers]]
name = "chat"
```
## Key Mappings

View File

@ -3,12 +3,12 @@ title: "SpaceVim checkers layer"
description: "Syntax checking automatically within SpaceVim, display error on the sign column and statusline."
---
# [SpaceVim Layers:](../) checkers
# [Available Layers](../) >> checkers
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Install](#install)
- [Configuration](#configuration)
- [Key bindings](#key-bindings)
@ -18,35 +18,47 @@ description: "Syntax checking automatically within SpaceVim, display error on th
This layer provides syntax checking feature.
## Layer Installation
## Install
checkers layer is loaded by default.
To use this configuration layer, add following snippet to your custom configuration file.
```toml
[[layers]]
name = "checkers"
```
## Configuration
By default, the error will be display below current line, if you want to disabled this feature, you may need to load this layer with `show_cursor_error` to 0.
**Layer options:**
```vim
call SpaceVim#layers#load('checkers', {
\ 'show_cursor_error' : 0,
\ })
By default, the error will be display below current line, if you want to disabled this
feature, you may need to load this layer with `show_cursor_error` to `false`.
```toml
[[layers]]
name = "checkers"
show_cursor_error = false
```
**Global options:**
| Name | default value | description |
| ---------------------------- | ------------- | -------------------------------------------------------- |
| `g:spacevim_enable_neomake` | 1 | Use neomake as default checking tools |
| `g:spacevim_enable_ale` | 0 | Use ale as default checking tools |
| `g:spacevim_lint_on_the_fly` | 0 | Syntax checking on the fly feature, disabled by default. |
the following options are SpaceVim option, you need to config them in `[options]` section.
| Name | default value | description |
| ----------------- | ------------- | -------------------------------------------------------- |
| `enable_neomake` | `true` | Use neomake as default checking tools |
| `enable_ale` | `false` | Use ale as default checking tools |
| `lint_on_the_fly` | `false` | Syntax checking on the fly feature, disabled by default. |
**NOTE:** if you want to use ale, you need:
```viml
let g:spacevim_enable_neomake = 0
let g:spacevim_enable_ale = 1
```toml
[options]
enable_neomake = false
enable_ale = true
```
and if you want to use syntastic, set this two options to 0.
and if you want to use syntastic, set this two options to `false`.
## Key bindings
@ -61,7 +73,7 @@ and if you want to use syntastic, set this two options to 0.
| `SPC e l` | Normal | display a list of all the errors |
| `SPC e L` | Normal | display a list of all the errors and focus the errors buffer |
| `SPC e e` | Normal | explain the error at point |
| `SPC e s` | Normal | set syntax checker (TODO) |
| `SPC e S` | Normal | set syntax checker executable (TODO) |
| `SPC e s` | Normal | set syntax checker (TODO) |
| `SPC e S` | Normal | set syntax checker executable (TODO) |
| `SPC e v` | Normal | verify syntax setup |
| `SPC t s` | Normal | toggle syntax |

View File

@ -3,16 +3,34 @@ title: "SpaceVim chinese layer"
description: "Layer for chinese users, include chinese docs and runtime messages"
---
# [Layers](../) > chinese
# [Available Layers](../) >> chinese
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Configuration](#configuration)
<!-- vim-markdown-toc -->
## Description
This layer is for chinese users, and provide chinese docs and runtime messages.
## Layer Installation
## Install
To use this configuration layer, add `splayer 'chinese'` to your custom configuration file.
To use this configuration layer, add following snippet to your custom configuration file.
```toml
[[layers]]
name = "chinese"
```
## Configuration
if you want to enable this feature, add `let g:spacevim_vim_help_language = 'cn'` to your custom config file.
if you want to enable this feature, add following snippet to your custom config file.
```toml
[options]
vim_help_language = "cn"
```

View File

@ -3,7 +3,7 @@ title: "SpaceVim colorscheme layer"
description: "colorscheme provides a list of colorscheme for SpaceVim, default colorscheme is gruvbox with dark theme."
---
# [SpaceVim Layers:](https://spacevim.org/layers) colorscheme
# [Available Layers](../) >> colorschemes
<!-- vim-markdown-toc GFM -->

View File

@ -3,13 +3,13 @@ title: "SpaceVim cscope layer"
description: "cscope layer provides a smart cscope and pycscope helper for SpaceVim, help users win at cscope"
---
# [Layers](../) > cscope
# [Available Layers](../) >> cscope
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Features](#features)
- [Installation](#installation)
- [Install](#install)
- [cscope](#cscope)
- [layer](#layer)
- [Key bindings](#key-bindings)
@ -27,7 +27,7 @@ For more info about the differences between Cscope and other similar tools, plea
- Tag indexing and searching for C-C++ via Cscope
- Tag indexing and searching for python via PyCscope
## Installation
## Install
### cscope

View File

@ -3,12 +3,28 @@ title: "SpaceVim ctrlp layer"
description: "This layers provide a heavily customized ctrlp centric work-flow"
---
# [SpaceVim Layers:](https://spacevim.org/layers) ctrlp
# [Available Layers](../) >> ctrlp
## Intro
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Description
This layer is a heavily customized wrapper for ctrlp.
## Install
To use this configuration layer, add it to your configuration file.
```toml
[[layers]]
name = "ctrlp"
```
## Key bindings

View File

@ -3,7 +3,7 @@ title: "SpaceVim debug layer"
description: "This layer provide debug workflow support in SpaceVim"
---
# [SpaceVim Layers:](https://spacevim.org/layers) debug
# [Available Layers](../) >> debug
<!-- vim-markdown-toc GFM -->
@ -19,7 +19,13 @@ This layer provide a debug workflow for SpaceVim. All of the function is based o
## Install
To use this configuration layer, add `call SpaceVim#layers#load('debug')` to your custom configuration file.
To use this configuration layer, add following snippet to your custom configuration file.
```toml
[[layers]]
name = "debug"
```
## Key bindings

View File

@ -3,12 +3,29 @@ title: "SpaceVim default layer"
description: "SpaceVim default layer contains no plugins, but It provides some better default config for SpaceVim."
---
# [SpaceVim Layers:](../) default
# [Available Layers](../) >> default
## Intro
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Key Mappings](#key-mappings)
<!-- vim-markdown-toc -->
## Description
SpaceVim default layer contains none plugins, but it has some better default config for vim and neovim.
## Install
To use this configuration layer, add it to your configuration file.
```toml
[[layers]]
name = "default"
```
## Key Mappings
| Key binding | Description |

View File

@ -3,12 +3,30 @@ title: "SpaceVim denite layer"
description: "This layers provide a heavily customized Denite centric work-flow"
---
# [SpaceVim Layers:](https://spacevim.org/layers) denite
# [Available Layers](../) >> denite
## Intro
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Configuration](#configuration)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Description
This layer is a heavily customized wrapper for denite and it's sources.
## Install
To use this configuration layer, add it to your configuration file.
```toml
[[layers]]
name = "denite"
```
## Configuration

View File

@ -3,18 +3,18 @@ title: "SpaceVim floobits layer"
description: "This layer adds support for the peer programming tool floobits to SpaceVim."
---
# [SpaceVim Layers:](https://spacevim.org/layers) floobits
# [Available Layers](../) >> floobits
<!-- vim-markdown-toc GFM -->
- [Intro](#intro)
- [Description](#description)
- [Features](#features)
- [Install](#install)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Intro
## Description
This layer adds support for the peer programming tool floobits to SpaceVim.

View File

@ -3,12 +3,28 @@ title: "SpaceVim fzf layer"
description: "This layers provide a heavily customized fzf centric work-flow"
---
# [SpaceVim Layers:](https://spacevim.org/layers) fzf
# [Available Layers](../) >> fzf
## Intro
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Description
This layer is a heavily customized wrapper for fzf.
## Install
To use this configuration layer, add it to your configuration file.
```toml
[[layers]]
name = "fzf"
```
## Key bindings

View File

@ -3,7 +3,7 @@ title: "SpaceVim git layer"
description: "This layers adds extensive support for git"
---
# [SpaceVim Layers:](https://spacevim.org/layers) git
# [Available Layers](../) >> git
<!-- vim-markdown-toc GFM -->

View File

@ -3,12 +3,12 @@ title: "SpaceVim github layer"
description: "This layer provides GitHub integration for SpaceVim"
---
# [SpaceVim Layers:](https://spacevim.org/layers) github
# [Available Layers](../) >> github
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Install](#install)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
@ -17,12 +17,13 @@ description: "This layer provides GitHub integration for SpaceVim"
This layer provides GitHub integration for SpaceVim.
## Layer Installation
## Install
To use this configuration layer, add it to your `~/.SpaceVim.d/init.vim`.
To use this configuration layer, add following snippet to your custom configuration file.
```vim
call SpaceVim#layers#load('github')
```toml
[[layers]]
name = "github"
```
## Key bindings

View File

@ -3,7 +3,7 @@ title: "SpaceVim lang#c layer"
description: "c/c++/object-c language support for SpaceVim, include code completion, jump to definition, quick runner."
---
# [Layers](../../) > lang#c
# [Available Layers](../../) >> lang#c
<!-- vim-markdown-toc GFM -->
@ -21,7 +21,12 @@ description: "c/c++/object-c language support for SpaceVim, include code complet
## Install
To use this configuration layer, add `call SpaceVim#layers#load('lang#c')` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#c"
```
## Features
@ -33,7 +38,7 @@ To use this configuration layer, add `call SpaceVim#layers#load('lang#c')` to yo
- `clang_executable` (string)
set the path to the clang executable
Set the path to the clang executable
- `libclang_path` (string)
@ -41,6 +46,8 @@ The libclang shared object (dynamic library) file path. by default it is empty.
- `clang_std` (dict)
A dict containing the standards you want to use. The default is:
```json
{
"c": "c11",
@ -54,6 +61,21 @@ The libclang shared object (dynamic library) file path. by default it is empty.
Create a `.clang` file at your project root. You should be able to just paste most of your compile flags in there. You can also use a list ['-Iwhatever', ...] when loadding this layer.
here is an example how to use above options:
```toml
[[layers]]
name = "lang#c"
clang_executable = "/usr/bin/clang"
[layer.clang_std]
c = "c11"
cpp = "c++1z"
objc = "c11"
objcpp = "c++1z"
```
## Key bindings
| key binding | description |

View File

@ -3,12 +3,12 @@ title: "SpaceVim lang#csharp layer"
description: "This layer is for csharp development"
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#csharp
# [Available Layers](../../) >> lang#csharp
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Installation](#installation)
- [Install](#install)
- [Layer](#layer)
- [OmniSharp Server](#omnisharp-server)
- [Key bindings](#key-bindings)
@ -19,11 +19,16 @@ description: "This layer is for csharp development"
This layer is for csharp development.
## Installation
## Install
### Layer
To use this configuration layer, add `SPLayer 'lang#csharp'` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#csharp"
```
### OmniSharp Server

View File

@ -3,13 +3,13 @@ title: "SpaceVim lang#dart layer"
description: "This layer is for dart development, provide autocompletion, syntax checking, code format for dart file."
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#dart
# [Available Layers](../../) >> lang#dart
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Features](#features)
- [Installation](#installation)
- [Install](#install)
- [Layer](#layer)
- [Syntax checking && Code formatting](#syntax-checking--code-formatting)
- [Install dart-repl](#install-dart-repl)
@ -33,11 +33,16 @@ This layer is for dart development.
- REPL
- code runner
## Installation
## Install
### Layer
To use this configuration layer, add `call SpaceVim#layers#load('lang#dart')` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#dart"
```
### Syntax checking && Code formatting

View File

@ -3,7 +3,7 @@ title: "SpaceVim lang#elixir layer"
description: "This layer is for elixir development, provide autocompletion, syntax checking, code format for elixir file."
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#elixir
# [Available Layers](../../) >> lang#elixir
<!-- vim-markdown-toc GFM -->
@ -35,7 +35,12 @@ SpaceVim also provides REPL/Debug support for elixir.
### Layer
To use this configuration layer, add `SPLayer 'lang#elixir'` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#elixir"
```
## Key bindings

View File

@ -3,7 +3,7 @@ title: "SpaceVim golang layer"
description: "This layer is for golang development. It also provides additional language-specific key mappings."
---
# [SpaceVim Layers:](https://spacevim.org/layers) go
# [Available Layers](../../) >> lang#go
<!-- vim-markdown-toc GFM -->
@ -20,7 +20,12 @@ This layer is for golang development. It also provides additional language-speci
## Install
To use this configuration layer, add `call SpaceVim#layers#load('lang#go')` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#go"
```
## Features
@ -33,17 +38,29 @@ To use this configuration layer, add `call SpaceVim#layers#load('lang#go')` to y
**Import key bindings:**
| Key Binding | Description |
| ----------- | --------------- |
| SPC l i | go implements |
| SPC l f | go info |
| SPC l e | go rename |
| SPC l r | go run |
| SPC l b | go build |
| SPC l t | go test |
| SPC l d | go doc |
| SPC l v | go doc vertical |
| SPC l c | go coverage |
| Key Binding | Description |
| ----------- | ------------------------- |
| `SPC l a` | go alternate |
| `SPC l b` | go build |
| `SPC l c` | go coverage |
| `SPC l d` | go doc |
| `SPC l D` | go doc vertical |
| `SPC l e` | go rename |
| `SPC l g` | go definition |
| `SPC l G` | go generate |
| `SPC l h` | go info |
| `SPC l i` | go implements |
| `SPC l I` | implement stubs |
| `SPC l k` | add tags |
| `SPC l K` | remove tags |
| `SPC l l` | list declarations in file |
| `SPC l m` | format improts |
| `SPC l M` | add import |
| `SPC l r` | go referrers |
| `SPC l s` | fill struct |
| `SPC l t` | go test |
| `SPC l v` | freevars |
| `SPC l x` | go run |
**Code formatting:**

View File

@ -3,12 +3,12 @@ title: "SpaceVim lang#haskell layer"
description: "haskell language support for SpaceVim, includes code completion, syntax checking, jumping to definition, also provides language server protocol support for haskell"
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#haskell
# [Available Layers](../../) >> lang#haskell
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Install](#install)
- [Features](#features)
<!-- vim-markdown-toc -->
@ -17,9 +17,14 @@ description: "haskell language support for SpaceVim, includes code completion, s
This layer is for haskell development.
## Layer Installation
## Install
To use this configuration layer, add `call SpaceVim#layers#load('lang#haskell')` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#haskell"
```
## Features

View File

@ -3,12 +3,12 @@ title: "SpaceVim lang#html layer"
description: "Edit html in SpaceVim, with this layer, this layer provides code completion, syntax checking and code formatting for html."
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#html
# [Available Layers](../../) >> lang#html
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Install](#install)
- [Language server](#language-server)
- [Features](#features)
- [Key bindings](#key-bindings)
@ -19,9 +19,14 @@ description: "Edit html in SpaceVim, with this layer, this layer provides code c
This layer adds support for editing HTML and CSS.
## Layer Installation
## Install
To use this configuration layer, add `call SpaceVim#layers#load('lang#html')` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#html"
```
### Language server

View File

@ -3,7 +3,7 @@ title: "SpaceVim lang#java layer"
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
# [Available Layers](../../) >> lang#java
<!-- vim-markdown-toc GFM -->
@ -35,7 +35,12 @@ This layer is for Java development.
## Install
To use this configuration layer, add `SPLayer 'lang#java'` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#java"
```
## Key bindings

View File

@ -3,7 +3,7 @@ title: "SpaceVim lang#javascript layer"
description: "This layer is for JaveScript development"
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#javascript
# [Available Layers](../../) >> lang#javascript
<!-- vim-markdown-toc GFM -->
@ -23,7 +23,12 @@ This layer is for JavaScript development.
## Install
To use this configuration layer, add `call SpaceVim#layers#load('lang#javascript')` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#javascript"
```
## Features

View File

@ -3,13 +3,29 @@ title: "SpaceVim lang#lisp layer"
description: "This layer is for lisp development, provide autocompletion, syntax checking, code format for lisp file."
---
# [Layers](../../) > lang#lisp
# [Available Layers](../../) >> lang#lisp
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Requirement](#requirement)
- [mappings](#mappings)
<!-- vim-markdown-toc -->
## Description
This layer is for lisp development.
## Install
To include this layer, add `SPLayer 'lang#lisp'` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#lisp"
```
## Requirement

View File

@ -3,17 +3,17 @@ title: "SpaceVim lang#lua layer"
description: "This layer is for lua development, provide autocompletion, syntax checking, code format for lua file."
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#lua
# [Available Layers](../../) >> lang#lua
<!-- vim-markdown-toc GFM -->
* [Description](#description)
* [Installation](#installation)
* [Layer](#layer)
* [Syntax checking && Code formatting](#syntax-checking--code-formatting)
* [Key bindings](#key-bindings)
* [Inferior REPL process](#inferior-repl-process)
* [Running current script](#running-current-script)
- [Description](#description)
- [Install](#install)
- [Layer](#layer)
- [Syntax checking && Code formatting](#syntax-checking--code-formatting)
- [Key bindings](#key-bindings)
- [Inferior REPL process](#inferior-repl-process)
- [Running current script](#running-current-script)
<!-- vim-markdown-toc -->
@ -21,11 +21,16 @@ description: "This layer is for lua development, provide autocompletion, syntax
This layer is for lua development.
## Installation
## Install
### Layer
To use this configuration layer, add `SPLayer 'lang#lua'` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#lua"
```
### Syntax checking && Code formatting

View File

@ -3,12 +3,12 @@ title: "SpaceVim lang#markdown layer"
description: "Edit markdown within vim, autopreview markdown in the default browser, with this layer you can also format markdown file."
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#markdown
# [Available Layers](../../) >> lang#markdown
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Install](#install)
- [formatting](#formatting)
- [options](#options)
- [Key bindings](#key-bindings)
@ -19,9 +19,14 @@ description: "Edit markdown within vim, autopreview markdown in the default brow
This layer is for editing markdown file.
## Layer Installation
## Install
To use this configuration layer, add `call SpaceVim#layers#load('lang#markdown')` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#markdown"
```
## formatting

View File

@ -3,7 +3,7 @@ title: "SpaceVim lang#ocaml layer"
description: "This layer is for Python development, provide autocompletion, syntax checking, code format for ocaml file."
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#ocaml
# [Available Layers](../../) >> lang#ocaml
<!-- vim-markdown-toc GFM -->
@ -22,7 +22,12 @@ When using in a multi-file project, be sure to include a [.merlin](https://githu
## Install
To use this configuration layer, add `call SpaceVim#layers#load('lang#ocaml')` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#ocaml"
```
## Features

View File

@ -3,13 +3,13 @@ title: "SpaceVim lang#php layer"
description: "This layer adds PHP language support to SpaceVim"
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#php
# [Available Layers](../../) >> lang#php
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Features](#features)
- [Layer Installation](#layer-installation)
- [Install](#install)
- [Requirement](#requirement)
<!-- vim-markdown-toc -->
@ -26,9 +26,14 @@ This layer adds PHP language support to SpaceVim.
- refernce finder
- lsp support (require [lsp](https://spacevim.org/layers/language-server-protocol/) layer)
## Layer Installation
## Install
To use this configuration layer, add `call SpaceVim#layers#load('lang#php')` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#php"
```
### Requirement

View File

@ -3,7 +3,7 @@ title: "SpaceVim lang#python layer"
description: "This layer is for Python development, provide autocompletion, syntax checking, code format for python file."
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#python
# [Available Layers](../../) >> lang#python
<!-- vim-markdown-toc GFM -->
@ -15,6 +15,7 @@ description: "This layer is for Python development, provide autocompletion, synt
- [Buffer formatting](#buffer-formatting)
- [Format imports](#format-imports)
- [Key bindings](#key-bindings)
- [Jump to definition](#jump-to-definition)
- [Code generation](#code-generation)
- [Inferior REPL process](#inferior-repl-process)
- [Running current script](#running-current-script)
@ -36,7 +37,12 @@ This layer is for Python development.
### Layer
To use this configuration layer, add `call SpaceVim#layers#load('lang#python')` to your custom configuration file.
To use this configuration layer, add following snippet to your custom configuration file.
```toml
[[layers]]
name = "lang#python"
```
### Syntax Checking
@ -70,11 +76,17 @@ pip install --user isort
## Key bindings
### Jump to definition
| Mode | Key Binding | Description |
| ------ | ----------- | ------------------------------------------------ |
| normal | `g d` | Jump to the definition position of cursor symbol |
### Code generation
| Mode | Key Binding | Description |
| ------ | ----------- | ------------------------------------- |
| normal | `SPC l g d` | Generate docstring |
| Mode | Key Binding | Description |
| ------ | ----------- | ------------------ |
| normal | `SPC l g d` | Generate docstring |
### Inferior REPL process

View File

@ -3,12 +3,12 @@ title: "SpaceVim lang#ruby layer"
description: "This layer is for ruby development, provide autocompletion, syntax checking, code format for ruby file."
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#ruby
# [Available Layers](../../) >> lang#ruby
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Installation](#installation)
- [Install](#install)
- [Layer](#layer)
- [Syntax checking && Code formatting](#syntax-checking--code-formatting)
- [Key bindings](#key-bindings)
@ -22,11 +22,16 @@ description: "This layer is for ruby development, provide autocompletion, syntax
This layer is for ruby development.
## Installation
## Install
### Layer
To use this configuration layer, add `SPLayer 'lang#ruby'` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#ruby"
```
### Syntax checking && Code formatting

View File

@ -3,12 +3,12 @@ title: "SpaceVim lang#typescript layer"
description: "This layer is for TypeScript development"
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#typescript
# [Available Layers](../../) >> lang#typescript
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Install](#install)
- [Features](#features)
- [Layer configuration](#layer-configuration)
@ -18,9 +18,16 @@ description: "This layer is for TypeScript development"
This layer is for TypeScript development.
## Layer Installation
## Install
To use this configuration layer, add `call SpaceVim#layers#load('lang#typescript')` to your custom configuration file. BTW, you need to install TypeScript via:
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#typescript"
```
BTW, you need to install TypeScript via:
```sh
npm install -g typescript

View File

@ -3,23 +3,28 @@ title: "SpaceVim lang#vim layer"
description: "This layer is for writting vim script, including code completion, syntax checking and buffer formatting"
---
# [SpaceVim Layers:](https://spacevim.org/layers) lang#vim
# [Available Layers](../../) >> lang#vim
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Layer Installation](#layer-installation)
- [Install](#install)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Description
This layer is for vim plugin development.
This layer is for writting vim script, including code completion, syntax checking and buffer formatting
## Layer Installation
## Install
To use this configuration layer, add `call SpaceVim#layers#load('lang#vim')` to your custom configuration file.
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "lang#vim"
```
## Key bindings

View File

@ -3,7 +3,7 @@ title: "SpaceVim language server protocol layer"
description: "This layers provides language server protocol for vim and neovim"
---
# [SpaceVim Layers:](https://spacevim.org/layers) lsp
# [Available Layers](../) >> lsp
<!-- vim-markdown-toc GFM -->

View File

@ -3,12 +3,20 @@ title: "SpaceVim leaderf layer"
description: "This layers provide a heavily customized LeaderF centric work-flow"
---
# [SpaceVim Layers:](https://spacevim.org/layers) denite
# [Available Layers](../) >> leaderf
## Intro
## Description
This layer is a heavily customized wrapper for LeaderF and it's sources.
## Install
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "leaderf"
```
## Configuration

View File

@ -3,7 +3,7 @@ title: "SpaceVim shell layer"
description: "This layer provide shell support in SpaceVim"
---
# [SpaceVim Layers:](https://spacevim.org/layers) shell
# [Available Layers](../) >> shell
<!-- vim-markdown-toc GFM -->

View File

@ -3,14 +3,14 @@ title: "SpaceVim tags layer"
description: "This layer provide tags manager for project"
---
# [SpaceVim Layers:](https://spacevim.org/layers) tags
# [Available Layers](../) >> tags
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Features](#features)
- [Install](#install)
- [GNU Global (gtags)](#gnu-global-gtags)
- [GNU Global](#gnu-global)
- [Install on OSX using Homebrew](#install-on-osx-using-homebrew)
- [Install on \*nix from source](#install-on-nix-from-source)
- [Install recommended dependencies](#install-recommended-dependencies)
@ -51,11 +51,14 @@ This layer provide tags manager for project. This layer need `core` layer's proj
## Install
### GNU Global (gtags)
### GNU Global
To use gtags, you first have to install [GNU Global](https://www.gnu.org/software/global/download.html).
You can install global from the software repository of your OS; however, many OS distributions are out of date, and you will probably be missing support for pygments and exuberant ctags, and thus support for many languages. We recommend installing from source. If not for example to install on Ubuntu:
You can install global from the software repository of your OS; however, many OS distributions
are out of date, and you will probably be missing support for pygments and exuberant ctags, and
thus support for many languages. We recommend installing from source. If not for example to
install on Ubuntu:
```sh
sudo apt-get install global
@ -111,10 +114,11 @@ echo export GTAGSLABEL=pygments >> .profile
### Load tags layer
To use this configuration layer, add it to your `~/.SpaceVim.d/init.vim`.
To use this configuration layer, update custom configuration file with:
```vim
call SpaceVim#layers#load('tags')
```toml
[[layers]]
name = "tags"
```
## Usage

View File

@ -3,14 +3,13 @@ title: "SpaceVim tools layer"
description: "This layer provides some tools for vim"
---
# [SpaceVim Layers:](https://spacevim.org/layers) tools
# [Available Layers](../) >> tools
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Commands](#commands)
<!-- vim-markdown-toc -->
@ -21,10 +20,11 @@ called via command. no key bindings will be definded in this layer.
## Install
This layer is disabled by default in SpaceVim.
To use this configuration layer, update custom configuration file with:
To use this configuration layer, add `call SpaceVim#layers#load('tools')` to your custom configuration file.
## Commands
```toml
[[layers]]
name = "tools"
```

View File

@ -3,11 +3,12 @@ title: "SpaceVim ui layer"
description: "Awesome UI layer for SpaceVim, provide IDE-like UI for neovim and vim in both TUI and GUI"
---
# [SpaceVim Layers:](https://spacevim.org/layers) ui
# [Available Layers](../) >> ui
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Plugins](#plugins)
<!-- vim-markdown-toc -->
@ -16,6 +17,14 @@ description: "Awesome UI layer for SpaceVim, provide IDE-like UI for neovim and
This is UI layer for SpaceVim, and it is loaded by default.
## Install
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "ui"
```
## Plugins

View File

@ -3,12 +3,31 @@ title: "SpaceVim unite layer"
description: "This layers provide a heavily customized Unite centric work-flow"
---
# [SpaceVim Layers:](https://spacevim.org/layers) unite
# [Available Layers](../) >> unite
## Intro
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Configuration](#configuration)
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Description
This layer is a heavily customized wrapper for unite.vim and unite sources.
## Install
To use this configuration layer, update custom configuration file with:
```toml
[[layers]]
name = "unite"
```
## Configuration
This is a fuzzy finder layer for SpaceVim, and it is based on unite.vim. In SpaceVim all fuzzy finder layer use same key bindings:

View File

@ -24,6 +24,7 @@ The next release is v0.9.0.
- Update faq for why using toml ([#1838](https://github.com/SpaceVim/SpaceVim/pull/1838))
- Update faq for using SpaceVim without overwrite vimrc ([#1848](https://github.com/SpaceVim/SpaceVim/pull/1848))
- Improve pull request template ([#1852](https://github.com/SpaceVim/SpaceVim/pull/1852))
- Update layer page ([#1860](https://github.com/SpaceVim/SpaceVim/pull/1860))
### Others