Ⅰ. 插件描述
Launch help in vertical window for wide-screen displaysⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/verticalhelp'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/verticalhelp'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/verticalhelp'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/VerticalHelp
Ⅳ. 文档说明
This is a very simple script to display help in an appropriately sized vertical window.
With a wide-screen monitor, vim's help is best displayed in a vertical window; but the command 'vertical help' opens a help window taking up half of the display. In my case, it opens a 250 column window to display an 80 column file. The width of the vertical window is the buffer's textwidth, typically specified in the file's modeline.
USAGE:
:H <topic> " Opens a help window vertically on the right
If a help topic was opened horizontally using :h, then the command :H will move and resize the window.
If a help window already exists that is vertical and sized appropriately, then :H will toggle between the help window and the previous window without having to <C-W>p.
:H allows for command-line completion, just as :h does.
OPTIONS:
g:vertical_help_left -- Define this to display the window on the left instead of the right.
NOTES:
I especially like to use this to display custom cheatsheets, which I format as vim help files. I put the cheatsheets under vimfiles/bundle/cheatsheets/doc. Then I call, for example,
:H git-cheatsheet, to pull up my notes. By basing the window width on textwidth, the cheatsheets are not limited to 80 columns.