# vim-airline
[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/chrisbra)
[![reviewdog](https://github.com/vim-airline/vim-airline/workflows/reviewdog/badge.svg?branch=master&event=push)](https://github.com/vim-airline/vim-airline/actions?query=workflow%3Areviewdog+event%3Apush+branch%3Amaster)
[![CI](https://github.com/vim-airline/vim-airline/workflows/CI/badge.svg)](https://github.com/vim-airline/vim-airline/actions?query=workflow%3ACI)
Lean & mean status/tabline for vim that's light as air.
![img](https://github.com/vim-airline/vim-airline/wiki/screenshots/demo.gif)
When the plugin is correctly loaded, there will be a nice statusline at the
bottom of each vim window.
That line consists of several sections, each one displaying some piece of
information. By default (without configuration) this line will look like this:
```
+-----------------------------------------------------------------------------+
|~ |
|~ |
|~ VIM - Vi IMproved |
|~ |
|~ version 8.2 |
|~ by Bram Moolenaar et al. |
|~ Vim is open source and freely distributable |
|~ |
|~ type :h :q<Enter> to exit |
|~ type :help<Enter> or <F1> for on-line help |
|~ type :help version8<Enter> for version info |
|~ |
|~ |
+-----------------------------------------------------------------------------+
| A | B | C X | Y | Z | [...] |
+-----------------------------------------------------------------------------+
```
The statusline is the colored line at the bottom, which contains the sections
(possibly in different colors):
section|meaning (example)
-------|------------------
A | displays the mode + additional flags like crypt/spell/paste (INSERT)
B | Environment status (VCS information - branch, hunk summary (master), [battery][61] level)
C | filename + read-only flag (~/.vim/vimrc RO)
X | filetype (vim)
Y | file encoding[fileformat] (utf-8[unix])
Z | current position in the file
[...] | additional sections (warning/errors/statistics) from external plugins (e.g. YCM, syntastic, ...)
The information in Section Z looks like this:
`10% ☰ 10/100 ln : 20`
This means:
```
10% - 10 percent down the top of the file
☰ 10 - current line 10
/100 ln - of 100 lines
: 20 - current column 20
```
For a better look, those sections can be colored differently, depending on various conditions
(e.g. the mode or whether the current file is 'modified')
# Features
* Tiny core written with extensibility in mind ([open/closed principle][8]).
* Integrates with a variety of plugins, including: [vim-bufferline][6],
[fugitive][4], [flog][62], [unite][9], [ctrlp][10], [minibufexpl][15], [gundo][16],
[undotree][17], [nerdtree][18], [tagbar][19], [vim-gitgutter][29],
[vim-signify][30], [quickfixsigns][39], [syntastic][5], [eclim][34],
[lawrencium][21], [virtualenv][31], [tmuxline][35], [taboo.vim][37],
[ctrlspace][38], [vim-bufmru][47], [vimagit][50], [denite][51],
[vim.battery][61] and more.
* Looks good with regular fonts and provides configuration points so you can use unicode or powerline symbols.
* Optimized for speed - loads in under a millisecond.
* Extensive suite of themes for popular color schemes including [solarized][23] (dark and light), [tomorrow][24] (all variants), [base16][32] (all variants), [molokai][25], [jellybeans][26] and others.
Note these are now external to this plugin. More details can be found in the [themes repository][46].
* Supports 7.2 as the minimum Vim version.
* The master branch tries to be as stable as possible, and new features are merged in only after they have gone through a [full regression test][33].
* Unit testing suite.
# Installation
This plugin follows the standard runtime path structure, and as such it can be installed with a variety of plugin managers:
| Plugin Manager | Install with... |
| ------------- | ------------- |
| [Pathogen][11] | `git clone https://github.com/vim-airline/vim-airline ~/.vim/bundle/vim-airline`<br/>Remember to run `:Helptags` to generate help tags |
| [NeoBundle][12] | `NeoBundle 'vim-airline/vim-airline'` |
| [Vundle][13] | `Plugin 'vim-airline/vim-airline'` |
| [Plug][40] | `Plug 'vim-airline/vim-airline'` |
| [VAM][22] | `call vam#ActivateAddons([ 'vim-airline' ])` |
| [Dein][52] | `call dein#add('vim-airline/vim-airline')` |
| [minpac][55] | `call minpac#add('vim-airline/vim-airline')` |
| pack feature (native Vim 8 package feature)| `git clone https://github.com/vim-airline/vim-airline ~/.vim/pack/dist/start/vim-airline`<br/>Remember to run `:helptags ~/.vim/pack/dist/start/vim-airline/doc` to generate help tags |
| manual | copy all of the files into your `~/.vim` directory |
## Straightforward customization
If you don't like the defaults, you can replace all sections with standard `statusline` syntax. Give your statusline that you've built over the years a face lift.
![image](https://f.cloud.github.com/assets/306502/1009429/d69306da-0b38-11e3-94bf-7c6e3eef41e9.png)
## Themes
Themes have moved to
another repository as of [this commit][45].
Install the themes as you would this plugin (Vundle example):
```vim
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
```
See [vim-airline-themes][46] for more.
## Automatic truncation
Sections and parts within sections can be configured to automatically hide when the window size shrinks.
![image](https://f.cloud.github.com/assets/306502/1060831/05c08aac-11bc-11e3-8470-a506a3037f45.png)
## Smarter tab line
Automatically displays all buffers when there's only one tab open.
![tabline](https://f.cloud.github.com/assets/306502/1072623/44c292a0-1495-11e3-9ce6-dcada3f1c536.gif)
This is disabled by default; add the following to your vimrc to enable the extension:
let g:airline#extensions#tabline#enabled = 1
Separators can be configured independently for the tabline, so here is how you can define "straight" tabs:
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
In addition, you can also choose which path formatter airline uses. This affects how file paths are
displayed in each individual tab as well as the current buffer indicator in the upper right.
To do so, set the `formatter` field with:
let g:airline#extensions#tabline#formatter = 'default'
Here is a complete list of formatters with screenshots:
#### `default`
![image](https://user-images.githubusercontent.com/2652762/34422844-1d005efa-ebe6-11e7-8053-c784c0da7ba7.png)
#### `jsformatter`
![image](https://user-images.githubusercontent.com/2652762/34422843-1cf6a4d2-ebe6-11e7-810a-07e6eb08de24.png)
#### `unique_tail`
![image](https://user-images.githubusercontent.com/2652762/34422841-1ce5b4ec-ebe6-11e7-86e9-3d45c876068b.png)
#### `unique_tail_improved`
![image](https://user-images.githubusercontent.com/2652762/34422842-1cee23f2-ebe6-11e7-962d-97e068873077.png)
## Seamless integration
vim-airline integrates with a variety of plugins out of the box. These extensions will be lazily loaded if and only if you have the other plugins installed (and of course you can turn them off).
#### [ctrlp.vim][10]
![image](https://f.cloud.githu
没有合适的资源?快使用搜索试试~ 我知道了~
Vim 窗口增添漂亮状态行的插件:一个为 Vim 编辑器设计的插件,能够为每个 Vim 窗口添加漂亮的状态行
共118个文件
vim:97个
vimspec:11个
md:4个
0 下载量 123 浏览量
2024-03-09
10:18:25
上传
评论
收藏 165KB ZIP 举报
温馨提示
一个为 Vim 编辑器设计的插件,能够为每个 Vim 窗口添加漂亮的状态行。状态行不仅提供了有用的信息,如当前文件名、光标位置和代码折叠状态,还可以通过主题和自定义进行个性化设置。这个插件使得 Vim 用户能够更直观地了解编辑环境的状态,提升了编辑体验。
资源推荐
资源详情
资源评论
收起资源包目录
Vim 窗口增添漂亮状态行的插件:一个为 Vim 编辑器设计的插件,能够为每个 Vim 窗口添加漂亮的状态行 (118个子文件)
.gitignore 70B
LICENSE 1KB
README.md 18KB
CHANGELOG.md 13KB
CONTRIBUTING.md 2KB
ISSUE_TEMPLATE.md 453B
.themisrc 594B
airline.txt 87KB
highlighter.vim 24KB
tabline.vim 18KB
extensions.vim 18KB
xtabline.vim 14KB
branch.vim 12KB
init.vim 11KB
async.vim 11KB
builder.vim 10KB
airline.vim 10KB
airline.vim 9KB
buffers.vim 9KB
dark.vim 8KB
util.vim 7KB
builder.vim 7KB
whitespace.vim 7KB
parts.vim 7KB
themes.vim 6KB
ctrlspace.vim 5KB
tabws.vim 5KB
hunks.vim 5KB
wordcount.vim 4KB
tabs.vim 4KB
ale.vim 4KB
po.vim 4KB
languageclient.vim 3KB
cursormode.vim 3KB
default.vim 3KB
lsp.vim 3KB
default.vim 3KB
term.vim 3KB
ctrlp.vim 3KB
unique_tail_improved.vim 3KB
vimtex.vim 3KB
buflist.vim 3KB
nvimlsp.vim 2KB
section.vim 2KB
nrrwrgn.vim 2KB
tagbar.vim 2KB
fugitiveline.vim 2KB
coc.vim 2KB
example.vim 2KB
denite.vim 2KB
quickfix.vim 2KB
eclim.vim 2KB
searchcount.vim 2KB
msdos.vim 2KB
autoshow.vim 2KB
readingtime.vim 2KB
default.vim 2KB
localsearch.vim 2KB
unique_tail.vim 2KB
fzf.vim 1KB
syntastic.vim 1KB
taglist.vim 1KB
promptline.vim 1KB
scrollbar.vim 1KB
omnisharp.vim 1KB
vimcmake.vim 1KB
ycm.vim 1KB
neomake.vim 1KB
fern.vim 1KB
bufferline.vim 1KB
rufo.vim 1KB
netrw.vim 1KB
gina.vim 1KB
debug.vim 1KB
virtualenv.vim 1KB
vim9lsp.vim 990B
keymap.vim 979B
short_path_improved.vim 970B
dirvish.vim 965B
xkblayout.vim 964B
tmuxline.vim 948B
windowswap.vim 922B
undotree.vim 911B
csv.vim 900B
zoomwintab.vim 896B
poetv.vim 881B
vimagit.vim 878B
bookmark.vim 828B
unite.vim 796B
unicode.vim 781B
ctrlspace.vim 770B
vimodoro.vim 714B
tabnr.vim 691B
obsession.vim 670B
short_path.vim 634B
battery.vim 595B
gen_tags.vim 578B
jsformatter.vim 569B
vista.vim 551B
capslock.vim 531B
共 118 条
- 1
- 2
资源评论
UnknownToKnown
- 粉丝: 1w+
- 资源: 773
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功