A vim plugin to toggle booleans or any values
Plug 'Yohannfra/Vim-Flip'
git clone https://github.com/Yohannfra/Vim-Flip ~/.vim/plugin/
In you .vimrc create a dictionnary and add the values you want to be able to toggle
Example:
let g:vim_flip_dict = {
\"true" : "false",
\"True" : "False",
\ "TRUE": "FALSE",
\ "0" : "1"
\}
This example is the default config.
If it's enough for you, you don't need to add it to your .vimrc.
Place you cursor on the word you want to toggle and type
:Flip
or
add a line like this in your .vimrc
nnoremap <Leader>p :Flip <CR>
This project is licensed under the terms of the MIT license.