1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 02:20:03 +08:00
SpaceVim/docs/layers/core/statusline.md

97 lines
2.3 KiB
Markdown
Raw Normal View History

2018-09-12 20:14:20 +08:00
---
title: "SpaceVim core#statusline layer"
description: "This layer provides default statusline for SpaceVim"
---
# [Available Layers](../) >> core#statusline
<!-- vim-markdown-toc GFM -->
- [Description](#description)
2019-02-23 16:20:01 +08:00
- [Install](#install)
2018-09-12 20:14:20 +08:00
- [Configuration](#configuration)
<!-- vim-markdown-toc -->
2019-02-23 16:20:01 +08:00
### Description
2018-09-12 20:14:20 +08:00
2019-02-23 16:20:01 +08:00
This layer provides a heavily customized powerline with the following capabilities:
2018-09-12 20:14:20 +08:00
2019-02-23 16:20:01 +08:00
- 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)
2019-01-07 21:15:22 +08:00
2019-02-23 16:20:01 +08:00
### 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"
2019-01-07 21:15:22 +08:00
2019-02-23 16:20:01 +08:00
# 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)