We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
This function can be used to switch between booleans anywhere on the line and returning to original cursor position:
True
False
true
false
1
0
function! ToggleBool() let save_pos = getpos(".") normal! 0 if search('\c\<true\>\|\<false\>', '', line('.')) > 0 Switch elseif search('\<1\>', '', line('.')) > 0 execute 's/\<1\>/0/' elseif search('\<0\>', '', line('.')) > 0 execute 's/\<0\>/1/' endif call setpos(".", save_pos) endfunction command! -nargs=0 ToggleBool call ToggleBool()
There was an error while loading. Please reload this page.