Ⅰ. 插件描述
Unicode character cyclerⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/unicycle'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/unicycle'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/unicycle'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/UniCycle
Ⅳ. 文档说明
This script cycles through certain Unicode characters while typing. It only
works if set encoding=utf-8.
When on, the hyphen (-), period (.), apostrophe ('), and quote (")
characters are mapped to the appropriate functions within this file.
When you enter two hyphen characters in a row, the first hyphen character
will cycle to an EN DASH character. A third hyphen will turn the EN DASH
into an EM DASH. A fourth hyphen will turn your EM DASH back into a
HYPHEN-MINUS.
Entering three periods in a row will replace all three periods with a
HORIZONTAL ELLIPSIS character.
Entering an apostrophe will try to determine if the apostrophe should be a
LEFT SINGLE QUOTATION MARK or RIGHT SINGLE QUOTATION MARK. It does this by
looking at the character to the left of the new character. You can cycle
between LEFT SINGLE QUOTATION MARK, APOSTROPHE, and RIGHT SINGLE QUOTATION
MARK by repeatedly hitting your apostrophe key.
Quote characters are treated in the same manner as apostrophe characters.
You get either a LEFT DOUBLE QUOTATION MARK, normal QUOTATION MARK, or RIGHT
DOUBLE QUOTATION MARK based on the previous character and how many times you
hit your quote key in a row.