Ⅰ. 插件描述
Learn VIM habits through individual tips to the VIM title barⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'tobys/vimtip'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'tobys/vimtip'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'tobys/vimtip'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/tobys/vimtip
Ⅳ. 文档说明
======
VIMTip
VIMTip allows you to display custom tips in your terminal emulations title bar.
This is especially useful for learning new VIM habits, which improve your daily
working cycle.
To set VIMTip up, install the script and configure the following things:
- A list of tips to use into g:vimtip_tips
- Events on which the displayed tip should be changed
For example::
let g:vimtip_tips = []
call add(g:vimtip_tips, "Minimize horizon. window: <CTRL>+<w> <_>")
call add(g:vimtip_tips, "Register <*> is middle mouse clipboard")
call add(g:vimtip_tips, "Minimize vert. window: <CTRL>+<w> <|>")
call add(g:vimtip_tips, "Search in pman: <SHIFT>+<k>")
call add(g:vimtip_tips, "Jump to matching brace: <%>")
autocmd VimEnter * call vimtip#NextTip()
autocmd WinEnter * call vimtip#NextTip()
This defines 5 tips and makes a tip appear as soon as you start up VIM. In
addition, the tip changes every time you switch windows. Since this would
change the title of your terminal anyway, it does not disturb your normal
working flow.
You can still customize your titlestring using the g:vimtip_titlestring
- Use
{tip}to place the tip where you want it. It defaults to::let g:vimtip_titlestring = "%<%F%={tip}"
Have fun.
..
Local Variables:
mode: rst
fill-column: 79
End:
vim: et syn=rst tw=79