Ⅰ. 插件描述
cutils is a repository of small functions I've found useful when using vim.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'chilicuil/vim-cutils'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'chilicuil/vim-cutils'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'chilicuil/vim-cutils'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/chilicuil/vim-cutils
Ⅳ. 文档说明
About
cutils is a repository of small functions I've found useful when using vim. This plugin was created to clean my vimrc file (which at the time was getting huge > 1200 LOC!). Feel free to use it, suggest new functions or improve current ones.
NOTE: Not all functions are mine. you'll find the url/author from where I fetch the original versions at the documentation.
<p align="center">

</p>
Requirements
- Vim 7.0+
Installation
Vundle way (recommended), add the following to your $HOME/.vimrc file:
Bundle 'javier-lopez/cutils.vim'
And run inside of vim::BundleInstall
- Pathogen way:
$ git clone https://github.com/javier-lopez/cutils.vim.git ~/.vim/bundle/cutils.vim
Manual (simplest if you've never heard of vundle or pathogen), download the zip file generated from github and extract it to $HOME/.vim
mv cutils.vim*.zip $HOME/.vim
cd $HOME/.vim && unzip cutils*.zipUpdate the help tags from vim::helpt ~/.vim/doc/
Usage
cutils define at least the following functions:
- CULongLines (show long lines)
:CULongLines [#_characters]
let g:cutils_map_longlines = '<Leader>cul'
<p align="center">

</p>
CUVCSInfo (show branch information, support: git, svn)
:echo CUVCSInfo() [master] :set statusline+=%{CUVCSInfo()}
<p align="center">

</p>
- CUFileSize (show current file size in Kb or MB)
:echo CUFileSize()
2kb
set statusline+=%-7{CUFileSize()}
<p align="center">

</p>
- CUAppendModeLine (append modeline at the end of current file)
:CUAppendModeLine
let g:cutils_map_appendmodeline = '<Leader>cua'
<p align="center">

</p>
<!--TODO 11-03-2014 02:24 >> look for replacement-->
- CUSkel (template system for empty files)
let g:cutils_skel_dir = './assets/skeletons'
<p align="center">

</p>
- CUSetProperties (apply preferences by lang)
let g:cutils_setproperties_dir = './assets/lang'
- CUVisualSearch (enable [*|#] in visual mode)
let g:cutils_visualsearch = 1 "enabled by default
