spacevim/docs/cn/layers/core/statusline.md
JIe 2bb7059579
Some checks failed
Detach Plugins / check (FlyGrep.vim) (push) Has been cancelled
Detach Plugins / check (GitHub.vim) (push) Has been cancelled
Detach Plugins / check (JavaUnit.vim) (push) Has been cancelled
Detach Plugins / check (SourceCounter.vim) (push) Has been cancelled
Detach Plugins / check (cpicker.nvim) (push) Has been cancelled
Detach Plugins / check (dein-ui.vim) (push) Has been cancelled
Detach Plugins / check (git.vim) (push) Has been cancelled
Detach Plugins / check (iedit.vim) (push) Has been cancelled
Detach Plugins / check (scrollbar.vim) (push) Has been cancelled
Detach Plugins / check (vim-chat) (push) Has been cancelled
Detach Plugins / check (vim-cheat) (push) Has been cancelled
Detach Plugins / check (vim-todo) (push) Has been cancelled
Detach Plugins / check (xmake.vim) (push) Has been cancelled
test / Linux (nvim, nightly) (push) Has been cancelled
test / Linux (nvim, v0.3.8) (push) Has been cancelled
test / Linux (nvim, v0.4.0) (push) Has been cancelled
test / Linux (nvim, v0.4.2) (push) Has been cancelled
test / Linux (nvim, v0.4.3) (push) Has been cancelled
test / Linux (nvim, v0.4.4) (push) Has been cancelled
test / Linux (nvim, v0.5.0) (push) Has been cancelled
test / Linux (nvim, v0.5.1) (push) Has been cancelled
test / Linux (nvim, v0.6.0) (push) Has been cancelled
test / Linux (nvim, v0.6.1) (push) Has been cancelled
test / Linux (nvim, v0.7.0) (push) Has been cancelled
test / Linux (nvim, v0.7.2) (push) Has been cancelled
test / Linux (nvim, v0.8.0) (push) Has been cancelled
test / Linux (nvim, v0.8.1) (push) Has been cancelled
test / Linux (nvim, v0.8.2) (push) Has been cancelled
test / Linux (nvim, v0.8.3) (push) Has been cancelled
test / Linux (nvim, v0.9.0) (push) Has been cancelled
test / Linux (nvim, v0.9.1) (push) Has been cancelled
test / Linux (true, vim, v7.4.052) (push) Has been cancelled
test / Linux (true, vim, v7.4.1689) (push) Has been cancelled
test / Linux (true, vim, v7.4.629) (push) Has been cancelled
test / Linux (true, vim, v8.0.0027) (push) Has been cancelled
test / Linux (true, vim, v8.0.0183) (push) Has been cancelled
test / Linux (vim, nightly) (push) Has been cancelled
test / Linux (vim, v8.0.0184) (push) Has been cancelled
test / Linux (vim, v8.0.1453) (push) Has been cancelled
test / Linux (vim, v8.1.2269) (push) Has been cancelled
test / Linux (vim, v8.2.2434) (push) Has been cancelled
test / Linux (vim, v8.2.3995) (push) Has been cancelled
test / Windows (nvim, nightly) (push) Has been cancelled
test / Windows (nvim, v0.3.8) (push) Has been cancelled
test / Windows (nvim, v0.4.2) (push) Has been cancelled
test / Windows (nvim, v0.4.3) (push) Has been cancelled
test / Windows (nvim, v0.4.4) (push) Has been cancelled
test / Windows (nvim, v0.5.0) (push) Has been cancelled
test / Windows (nvim, v0.5.1) (push) Has been cancelled
test / Windows (nvim, v0.6.0) (push) Has been cancelled
test / Windows (nvim, v0.6.1) (push) Has been cancelled
test / Windows (nvim, v0.7.0) (push) Has been cancelled
test / Windows (nvim, v0.7.2) (push) Has been cancelled
test / Windows (nvim, v0.8.0) (push) Has been cancelled
test / Windows (nvim, v0.8.1) (push) Has been cancelled
test / Windows (nvim, v0.8.2) (push) Has been cancelled
test / Windows (nvim, v0.8.3) (push) Has been cancelled
test / Windows (nvim, v0.9.0) (push) Has been cancelled
test / Windows (nvim, v0.9.1) (push) Has been cancelled
test / Windows (vim, nightly) (push) Has been cancelled
test / Windows (vim, v7.4.1185) (push) Has been cancelled
test / Windows (vim, v7.4.1689) (push) Has been cancelled
test / Windows (vim, v8.0.0027) (push) Has been cancelled
test / Windows (vim, v8.0.1453) (push) Has been cancelled
test / Windows (vim, v8.1.2269) (push) Has been cancelled
test / Windows (vim, v8.2.2434) (push) Has been cancelled
test / Windows (vim, v8.2.3995) (push) Has been cancelled
docker / docker (push) Has been cancelled
mirror / check (coding) (push) Has been cancelled
mirror / check (gitee) (push) Has been cancelled
mirror / check (gitlab) (push) Has been cancelled
init
2024-08-21 14:17:26 +08:00

2.8 KiB

title description lang
SpaceVim core#statusline 模块 这一模块为 SpaceVim 提供了一个高度定制的状态栏。 zh

可用模块 >> core#statusline

模块简介

这一模块为 SpaceVim 提供了一个高度定制的状态栏,包括如下特性,这一模块的灵感来自于 spacemacs 的状态栏。

  • 展示窗口序列号
  • 通过不同颜色展示当前模式
  • 展示搜索结果序列号
  • 显示/隐藏语法检查信息
  • 显示/隐藏电池信息
  • 显示/隐藏 SpaceVim 功能启用状态
  • 显示版本控制信息(需要 gitVersionControl 模块)

模块启用

可通过在配置文件内加入如下配置来启用该模块,该模块默认已经启用:

[[layers]]
  name = "core#statusline"

相关选项

在这里,将列出一些与状态栏相关的 SpaceVim 选项,这些选项并非模块选项,需加以区分:

[options]
    # options for statusline
    # 设置状态栏上分割符号形状,如果字体安装失败,可以将值设为 "nil" 以禁用分割符号,
    # 分割符包括以下几种 "arrow", "curve", "slant", "fire", "nil",默认为箭头 "arrow"
    # 设置活动窗口状态栏上的分割符号形状
    statusline_separator = "arrow"
    # 设置非活动窗口状态栏上的分割符号形状
    statusline_iseparator = "bar"

    # 设置顶部标签列表序号类型,有以下五种类型,分别是 0 - 4
    buffer_index_type = 4
    # 0: 1 ➛ ➊
    # 1: 1 ➛ ➀
    # 2: 1 ➛ ⓵
    # 3: 1 ➛ ¹
    # 4: 1 ➛ 1

    # 是否在状态栏上显示当前模式,默认情况下,不显示 Normal/Insert 等
    enable_statusline_mode = true

    # 状态栏左端部分的构成
    statusline_left_sections = ['winnr', 'major mode', 'filename', 'fileformat', 'minor mode lighters', 'version control info', 'search status']
    # 状态栏右端部分的构成
    statusline_right_sections = ['cursorpos', 'percentage', 'input method', 'date', 'time']
    # 列表可以由以下一项或多项组成

    # 'winnr' 当前窗口编号
    # 'syntax checking'
    # 'filename' 文件名
    # 'fileformat' 文件格式
    # 'major mode'
    # 'minor mode lighters'
    # 'cursorpos' 光标位置
    # 'percentage' 百分比
    # 'date' 日期
    # 'time' 时间
    # 'whitespace' 打开或者保存文件时,如果第 n 行的行尾有空格则显示 trailing[n],并不能实时显示出行尾有空格的行号。
    # 'battery status' 电池状态
    # 'input method' 输入法
    # 'search status' 搜索状态

更多关于 SpaceVim 状态栏的配置,可以参考《用户手册》