Ⅰ. 插件描述
A Vim plugin for quickly looking up a topic in google and inserting the relevant linkⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'christoomey/vim-quicklink'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'christoomey/vim-quicklink'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'christoomey/vim-quicklink'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/christoomey/vim-quicklink
Ⅳ. 文档说明
Vim Quicklink
A Vim plugin for quickly looking up a topic and inserting the relevant link
into a markdown document.

Usage
URL Searching
The main feature of vim-quicklink is to search for and insert a relevant link
without needing to leave vim. You can do this by visually selecting the word or
phrase you want to add a link around, then press <C-k> to activate the plugin.
A prompt will pop up asking for the text to search for, defaulting to the
highlighted text. Hit <enter> to run the search. A results window will pop up
with the following keymaps:
<tab>- Jump to next search result;<S-tab>- Jump to the previous result;o- open the link for the result under the cursor in your browser;<enter>- accept the result under the cursor;q- quit out of the quicklink adventure.
Link Opening
vim-quicklink also updates the gx mapping from netrw to work with markdown
link format. The default behavior of gx when your cursor is over a URL will
still work and is unchanged, but you can now also use gx on a markdown link
such as [webapi-vim][] in this readme and vim-quicklink will find and open
the associated URL using netrw. All keymaps :
gx- Open link under cursor;gl- Go to link defintion under cursor.
Installation
This plugin relies on a [webapi-vim][], a vimscript wrapper for interacting
with APIs. Assuming you're using Vundle, add the following line to your~/.vimrc file:
Bundle 'mattn/webapi-vim'
Bundle 'christoomey/vim-quicklink'