god.vim


Ⅰ. 插件描述

Get Online Doc link directly in vim

Ⅱ. 基本信息

创建日期:  2017-02-01
使用用户:  1
Github星:  2
插件作者:  Adrien Fabre

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'statox/god-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'statox/god-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'statox/god-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/statox/god.vim

Ⅳ. 文档说明

# GOD.vim

Get online doc link directly in Vim


This plugin helps you to help people!

You are writing something about Vim on a site which handles markdown language
*(like vi.se or
/r/vim or even a github Readme file like this one)*
and you want to direct your readers to a page of Vim doc?

Simply use the command :GOD {help-topic} to get in your clipboard a markdown
string allowing you to link to the http://vimhelp.appspot.com/ online help.

Examples

Link to one help topic

Give a single argument to the GOD command like this:

:GOD holy-grail

This will put in your clipboard the following string:

[`:h holy-grail`](http://vimhelp.appspot.com/index.txt.html#holy%2dgrail)

Which will appears like this for your readers:

:h holy-grail

Link to a list of help topics

Give several arguments to the GOD command like this:

:GOD help func-range /\~ g^

This will put a markdown formatted list in your clipboard like this one:

 - [`:h help`](http://vimhelp.appspot.com/helphelp.txt.html#help)
 - [`:h :func-range`](http://vimhelp.appspot.com/eval.txt.html#%3afunc%2drange)
 - [`:h /\~`](http://vimhelp.appspot.com/pattern.txt.html#%2f%5c%7e)
 - [`:h g^`](http://vimhelp.appspot.com/motion.txt.html#g%5e)

Which will appears like this for your readers:

Configuration

GOD.vim provides two variables that you can define in your vimrc:

Disable the plugin

To disable the plugin you can put the following line in your vimrc:

let g:loaded_god_vim = 1

Automatically close the help buffer

When you use the :GOD command, the corresponding help buffer will be open. If
you don't want to see it, you can add the following line to your vimrc:

let g:god_close_help_buffer = 1

GOD.vim? What's this name?

It actually stands for Get Online Doc :)

Thanks

I'd like to thanks Carpetsmoker who helped me improve the
encoding of the generated urls.

This plugin was inspired by this question on the site vi.stackexchange.com: [How
can I quickly convert a Vim help tag to a vimhelp.appspot.com
link?](http://vi.stackexchange.com/q/4346/1841)

添加新评论