Ⅰ. 插件描述
vim plugin to toggle the boolean valuesⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'sagarrakshe/toggle-bool'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'sagarrakshe/toggle-bool'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'sagarrakshe/toggle-bool'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/sagarrakshe/toggle-bool
Ⅳ. 文档说明
# toggle-bool
Vim plugin to toggle boolean values.
List of boolean values supported
- true <-> false
- yes <-> no
- on <-> off
- 0 <-> 1
Installation
Use your plugin manager of choice.
git clone https://github.com/sagarrakshe/toggle-bool ~/.vim/bundle/toggle-bool
- Add
Bundle 'https://github.com/sagarrakshe/toggle-bool'to .vimrc - Run
:BundleInstall
- Add
- Add
NeoBundle 'https://github.com/sagarrakshe/toggle-bool'to .vimrc - Run
:NeoBundleInstall
- Add
- Add
Plug 'https://github.com/sagarrakshe/toggle-bool'to .vimrc - Run
:PlugInstall
- Add
Usage
To invoke you need to call :ToggleBool. You can map accordingly.
For example, to map to <leader>r you need to add following to your .vimrc
noremap <leader>r :ToggleBool<CR>
Todo
- When word is replaced with the toggled value, it eats leading and trailing
spaces. - Support more for more values and logical operators.