vim-pythesaurus


Ⅰ. 插件描述

thesaurus.com for Vim

Ⅱ. 基本信息

创建日期:  2013-12-09
使用用户:  2
Github星:  0
插件作者:  drougas

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Vim PyThesaurus

This is a plugin for Vim allowing you to look up words on http://thesaurus.com/

This is a rewrite of Anton Beloglazov's Online Thesaurus using Vim's Python interface. Anton's plugin uses bash shell scripting, which might be a problem in some environments (ie., Windows).

The plugin displays the definition of the word under the cursor and a list of synonyms and antonyms.

The credit for the original idea and (part of) code and documentation effort goes to Anton Beloglazov and Nick Coleman.

Installation

If you are using Vundle, just add the following line to your .vimrc:

Bundle 'drougas/vim-pythesaurus'

Then run :BundleInstall to install the plugin.

Usage

The plugin provides the :PyThesaurusCurrentWord command to look up the current word under the cursor in an online thesaurus. Alternatively, you can look up any word with :PyThesaurus word.

Internally, both commands make a request to http://thesaurus.com/, parse the results, and display them in a vertical split in the bottom.

To close the split, just press q.

Configuration

You can map the :PyThesaurusCurrentWord command to anything you want as follows:

nnoremap <your key binding> :PyThesaurusCurrentWord<CR>

For example, to bind \K:

nnoremap <unique> <LocalLeader>K :PyThesaurusCurrentWord<CR>

Enjoy!

License

Distributed under the same terms as Vim itself.
See :help license.

添加新评论