Vim plugin to toggle boolean values.
- true <-> false
- yes <-> no
- on <-> off
- 0 <-> 1
- enable(d) <-> disable(d)
- first <-> last
- before <-> after
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
- Add
- NeoBundle
- Add
NeoBundle 'https://github.com/sagarrakshe/toggle-bool'
to .vimrc - Run
:NeoBundleInstall
- Add
- vim-plug
- Add
Plug 'https://github.com/sagarrakshe/toggle-bool'
to .vimrc - Run
:PlugInstall
- Add
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>
- When word is replaced with the toggled value, it eats leading and trailing spaces.
- Support more for more values and logical operators.