Ⅰ. 插件描述
translate a phrase by looking up in a dictionaryⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/transvim-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/transvim-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/transvim-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/transvim.vim
Ⅳ. 文档说明
This script looks up a word/phrase in a dictionary.
User can press key-shortcuts to translate word under cursor, visually selected
text or to be asked for a word.
Search-results are viewed in the same window in which searching
was started. To close a view, press 'q' - TransVim will then
switch back to the buffer comming from.
There are several possibilities to start a translation:
1) move cursor over word to be translated and press <Leader>tr
2) visually select word to be translated and press <Leader>tr
3) press <Leader>ta to be prompted for a word
Memory aid: tr = (T)(R)anslate, ta = (T)ranslate (A)sk for word
By default <Leader> is , so press tr, ta to start translation.
In order to prevent tremendous huge search-results, the search-string must be at
least 3 characters long (min. length is configurable).