Ⅰ. 插件描述
An indent guides plugin displaying thin vertical lines.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/indentline-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/indentline-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/indentline-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/indentLine.vim
Ⅳ. 文档说明
This plugin is used for displaying thin vertical lines at each indentation level for code indented with spaces. For code indented with tabs I think there is no need to support it, because you can use :set list lcs=tab:| (here is a space).
Requirements:
This plugin takes advantage of the newly provided conceal feature in Vim 7.3, so this plugin will not work with lower versions of Vim.
Installation:
To install the plugin just put the plugin files in your ~/.vim (Linux) or ~/vimfiles (Windows).
If you use a plugin manager you can put the whole directory into your ~/.vim/bundle/ directory (Pathogen) or add the line Bundle 'Yggdroot/indentLine' to your .vimrc (Vundle).
Customization:
You can change the color of indentLines:
for Vim, set g:indentLine_color_term in your .vimrc, e.g. let g:indentLine_color_term = 239,
for GVim, set g:indentLine_color_gui in your .vimrc, e.g. let g:indentLine_color_gui = '#A4E57E'
You can also change the indentLine char:
for both Vim and GVim, set let g:indentLine_char = 'c' where 'c' can be any ASCII character. You can also use one of ¦, ┆ or │ to display more beautiful lines. However, these characters will only work with files whose encoding is UTF-8.
Github:
https://github.com/Yggdroot/indentLine
Screenshots:
http://i.imgur.com/KVi0T.jpg
http://imgur.com/zhV1v
http://imgur.com/cENlq
http://i.imgur.com/tLYkb79.png
http://i.imgur.com/Rfr0Nor.png