toggle-bool


Ⅰ. 插件描述

vim plugin to toggle the boolean values

Ⅱ. 基本信息

创建日期:  2015-04-10
使用用户:  2
Github星:  7
插件作者:  Sagar Rakshe

Ⅲ. 安装方法

使用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.

  • Pathogen

    • git clone https://github.com/sagarrakshe/toggle-bool ~/.vim/bundle/toggle-bool
  • Vundle

    • Add Bundle 'https://github.com/sagarrakshe/toggle-bool' to .vimrc
    • Run :BundleInstall
  • NeoBundle

    • Add NeoBundle 'https://github.com/sagarrakshe/toggle-bool' to .vimrc
    • Run :NeoBundleInstall
  • vim-plug

    • Add Plug 'https://github.com/sagarrakshe/toggle-bool' to .vimrc
    • Run :PlugInstall

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

  1. When word is replaced with the toggled value, it eats leading and trailing
    spaces.
  2. Support more for more values and logical operators.

添加新评论