Ⅰ. 插件描述
Folded text is compressed on one lineⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/css-one-line-multi-line-folding'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/css-one-line-multi-line-folding'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/css-one-line-multi-line-folding'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/CSS-one-line--multi-line-folding
Ⅳ. 文档说明
/ one-line CSS (see http://neutroncreations.com/blog/single-line-vs-multi-line-css-plus-textmate-tips/) /
header h1 { float: left; width: 155px; height: 50px; }
/ Multiline CSS /
header h1 {
float: left;
width: 155px;
height: 50px;
}
Which to choose? One line CSS is easier to scan through and saves space, but multi-line CSS is easier to grep and edit.
This script sets you up so you edit and save multi-line CSS, but when you turn folding on, everything´s compressed on one line so you can scan through it easier.
Controls are vim´s standard for text folding:
zo and zc: Open and Close fold (set multiline, set oneline)
zR and zM: Reopen and Close all (globally set multiline, globally set oneline)
zj, zk: go down and up a fold (CSS block).