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

Update statusline doc

This commit is contained in:
Shidong Wang 2019-02-23 16:20:01 +08:00
parent 4b1f3273dd
commit 166c537cd7
3 changed files with 81 additions and 6 deletions

View File

@ -174,7 +174,7 @@ function! s:date() abort
endfunction
function! s:whitespace() abort
let ln = search('\s\+$', 'n')
let ln = search('\s\+$', 'nw')
if ln != 0
return ' trailing[' . ln . '] '
else

View File

@ -38,7 +38,7 @@ lang: cn
## 相关选项
在这里,将列出一些与状态栏相关的 SpaceVim 相关选项,这些选项并非模块选项,需加以区分:
在这里,将列出一些与状态栏相关的 SpaceVim 选项,这些选项并非模块选项,需加以区分:
```toml
[options]
@ -83,3 +83,4 @@ lang: cn
# 'search status' 搜索状态
```
更多关于 SpaceVim 状态栏的配置,可以参考[《用户手册》](../../../documentation/#状态栏)

View File

@ -8,15 +8,89 @@ description: "This layer provides default statusline for SpaceVim"
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Configuration](#configuration)
<!-- vim-markdown-toc -->
## Description
### Description
This layer provides default statusline for SpaceVim.
This layer provides a heavily customized powerline with the following capabilities:
## Configuration
- show the window number
- show the current mode
- color code for current state
- show the index of searching result
- toggle syntax checking info
- toggle battery info
- toggle minor mode lighters
- show VCS information (branch, hunk summary) (need `git` and `VersionControl` layer)
### Install
To use this configuration layer, add following snippet to your custom configuration file.
```toml
[[layers]]
name = "core#statusline"
```
### Configuration
Here is a list of SpaceVim options for statusline, these are different from layer options:
```toml
[options]
# options for statusline
# Set the statusline separators of statusline, default is "arrow"
statusline_separator = "arrow"
# Set the statusline separators of inactive statusline
statusline_inactive_separator = "bar"
# Set SpaceVim buffer index type
buffer_index_type = 4
# 0: 1 ➛ ➊
# 1: 1 ➛ ➀
# 2: 1 ➛ ⓵
# 3: 1 ➛ ¹
# 4: 1 ➛ 1
# Enable/Disable show mode on statusline
enable_statusline_display_mode = true
# left sections of statusline
statusline_left_sections = [
'winnr',
'major mode',
'filename',
'fileformat',
'minor mode lighters',
'version control info',
'search status'
]
# right sections of statusline
statusline_right_sections = [
'cursorpos',
'percentage',
'input method',
'date',
'time'
]
# 'winnr' window number
# 'syntax checking'
# 'filename' file name
# 'fileformat' file format
# 'major mode'
# 'minor mode lighters'
# 'cursorpos' cursor position
# 'percentage' content range
# 'date' date
# 'time' time
# 'whitespace' line number with trailing space at the end
# 'battery status' battery status
# 'input method' input method
# 'search status' search index
```
All statusline key bindings can be find on [SpaceVim documentation](../../../documentation/#statusline)