Ⅰ. 插件描述
A simple statusline for VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'bluz71/vim-moonfly-statusline'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'bluz71/vim-moonfly-statusline'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'bluz71/vim-moonfly-statusline'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/bluz71/vim-moonfly-statusline
Ⅳ. 文档说明
moonfly statusline
moonfly statusline is a simple yet informative statusline for Vim and Neovim
that uses moonfly colors by
default.
:cake: when the g:moonflyHonorUserDefinedColors option is enabled the
nightly Vim theme will style
the statusline using nightfly colors.
Screenshots



The font in use is Iosevka.
Dependency
First install moonfly
Plugins supported
Installation
Use your favoured plugin manager to install bluz71/vim-moonfly-statusline.
If using vim-plug do the following:
- Add
Plug 'bluz71/vim-moonfly-statusline'to your vimrc - Run
:PlugInstall
Notice
File explorers, such as NERDTree and _netrw_, and certain other special
windows will specifically not be styled by this plugin. Mode indicators in
such windows are not useful.
Options
g:moonflyWithGitBranchCharacter
moonfly statusline supports Tim Pope's
fugitive plugin.
The g:moonflyWithGitBranchCharacter option specifies whether to display Git
branch details using the Unicode Git branch character U+E0A0. By default Git
branches displayed in the statusline will not use that character since many
monospace fonts will not contain it. However, some modern fonts, such as [Fira
Code](https://github.com/tonsky/FiraCode) and
Iosevka, do contain the Git branch
character.
If g:moonflyWithGitBranchCharacter is unset the default value from
the fugitive plugin will be used.
To display the Unicode Git branch character please add the following to your
_vimrc_:
let g:moonflyWithGitBranchCharacter = 1The above screenshots are displayed with the Git branch character.
g:moonflyWithObessionGeometricCharacters
moonfly statusline supports Tim Pope's
obsession plugin.
The g:moonflyWithObessionGeometricCharacters option specifies whether to
display obsession details using Unicode geometric characters (U+25A0 - Black
Square & U+25CF - Black Circle). A modern font, such as
Iosevka, will contain those Unicode
geometric characters.
If g:moonflyWithObessionGeometricCharacters is unset the default value from
the obsession plugin will be used.
To display the Unicode Git branch character please add the following to your
_vimrc_:
let g:moonflyWithObessionGeometricCharacters = 1g:moonflyHonorUserDefinedColors
The g:moonflyHonorUserDefinedColors option specifies whether user-defined, or
theme-defined such as
nightfly, colors should be
used instead of the default colors from the moonfly color scheme.
let g:moonflyHonorUserDefinedColors = 1Here is an example user-defined theme override saved in an appropriate after
file such as ~/.vim/after/plugin/moonfly-statusline.vim:
highlight! link User1 DiffText
highlight! link User2 DiffAdd
highlight! link User3 Search
highlight! link User4 IncSearch
highlight! link User5 StatusLine
highlight! link User6 StatusLine
highlight! link User7 StatusLine
highlight! link User8 StatusLine