Ⅰ. 插件描述
allows you to toggle bool (true/false) and other words with a shortcutⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin '/toggle'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle '/toggle'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug '/toggle'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/Toggle
Ⅳ. 文档说明
In this version, the script can toggle:
True <-> False
true <-> false
on <-> off
yes <-> no
define <-> undef
+ <-> -
> <-> <
&& <-> ||
& <-> |
positive and negative numbers
Move the cursor on the word/char/number to be toggled and press
<C-T> in insert mode
or
+ in normal / visual mode.
This shortcut can be modified in the script file - of course...
If the cursor is positioned on a number, the script looks for a corresponding + or - sign for that number.
If it's found, it will be replaced by the other one. If none is found, a - sign is inserted before the number.