Last active
February 7, 2017 01:10
-
-
Save nerflad/5f63b83e39672933d1e48722d4879a9b to your computer and use it in GitHub Desktop.
Swap boolean truthiness keywords using increment/decrement keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ProvideAlternativeFacts() | |
if expand('<cword>') == "True" | |
execute "normal! ciwFalse" | |
elseif expand('<cword>') == "False" | |
execute "normal! ciwTrue" | |
endif | |
endfunction | |
nnoremap <c-a> :call ProvideAlternativeFacts()<CR><C-a> | |
nnoremap <c-x> :call ProvideAlternativeFacts()<CR><C-x> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment