Ⅰ. 插件描述
unite.vim source for haddockⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'eagletmt/unite-haddock'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'eagletmt/unite-haddock'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'eagletmt/unite-haddock'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/eagletmt/unite-haddock
Ⅳ. 文档说明
# unite-haddock
unite.vim source for haddock and hoogle
Usage
:Unite haddock shows all installed modules.
:Unite hoogle shows the result of hoogle command.
You have to install the hoogle command by cabal install hoogle to enable this source.
:Unite hoogle:exact shows the result of hoogle exact search.
It corresponds to passing --exact argument to hoogle.
Actions
browse_local (default)
Opens local haddock.
- Note: To generate local documentations, you must install packages with
--enable-documentation, or edit $HOME/.cabal/config:documentation: True.
browse_remote
Opens remote haddock (Hackage).
- Note: If you'd like to make this action default, add
call unite#custom_default_action('haddock', 'browse_remote')to your vimrc. See:help unite#custom_default_action()for more detail.
preview (hoogle only)
Shows the information in the preview window.
- Note: You can preview the informatin by pressing
pkey on a candidate.
Global Variables
g:unite_source_hoogle_max_candidates
The maximal number of candidates of hoogle.
Default: 200
g:unite_source_haddock_browser
The browser used to view documentations.
Normally, you don't have to set this variable.
If you're using a minor DE (e.g. awesome, XMonad) and xdg-open fails to recognize local file URIs correctly, set this variable manually in your ~/.vimrc.
let g:unite_source_haddock_browser = 'firefox'