Ⅰ. 插件描述
Dynamically switch languages/settings in multi-lingual documentsⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'tomtom/linglang'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'tomtom/linglang'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'tomtom/linglang'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/tomtom/linglang_vim
Ⅳ. 文档说明
The command |:Linglang| installs a buffer-local autocommand that checks
the current line's language. I.e. enabling linglang for the current
buffer won't affect other buffers. If the language of the line under the
cursor changes, a user-defined action (e.g., set spelllang) will be
executed.
:Linglang[!] [LANGS ...]
Toggle linglang support for the current buffer.
With [!], suppress message.
Currently supported:
- English
- German
In order to add a new language, you'll have to come up with some good
words/regexps to identify it.
*linglang-data*Language data is stored in .../autoload/linglang/LANGUAGE.ENCODING
The fileformat is simple:
- one word per line (these will be matched against word borders)
- arbitrary regular expressions: /REGEXP/
The pattern for the words and the regexps will be joined with | (see
|/bar|).
Status: Not in use (I wouldn't know if there were problems)
Dependencies:
hookcursormoved :: http://github.com/tomtom/hookcursormoved_vim
> git clone git://github.com/tomtom/hookcursormoved_vim.gitInstall: See http://github.com/tomtom/vimtlib/blob/master/INSTALL.TXT
See http://github.com/tomtom for related plugins.