Ⅰ. 插件描述
A Vim plugin for typing accented characters without remembering their pseudo versions.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'airblade/vim-accent'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'airblade/vim-accent'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'airblade/vim-accent'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/airblade/vim-accent
Ⅳ. 文档说明
# vim-accent
A Vim plugin for typing accented characters without having to remember the handful of pseudo versions. It's an alternative to digraphs and the accents keymap.
How would you type ä in insert mode? How would you replace a with ä in normal mode?
With this plugin
In insert mode: type a and hit <CTRL-X><CTRL-U> to bring up a list of accented as to choose from.
In normal mode with the cursor on a: use gx to cycle through the alternatives.
It's always the same process, no matter what accent you want.
Digraphs
In insert mode: type <CTRL-K>a:.
In normal mode with the cursor on a: type r<CTRL-K>a:.
See :help digraphs.
Accents keymap
Type :set keymap=accents. This could be in your vimrc.
In insert mode: type :a.
In normal mode with the cursor on a: type r:a.
See :help mbyte-keymap and $VIMRUNTIME/keymap/accents.vim. You can toggle the keymap on and off with <CTRL-^> in insert mode or command mode.
Limitations
The plugin uses a custom completion function for its list of accents, but Vim only allows one type of custom completion at a time. A workaround is to use a wrapper function, as described at the end of this article.
The plugin could allow you to opt in or out of accents by language...but it doesn't yet.
Licence
Copyright Andrew Stewart. Distributed under the MIT licence.