Moved to https://git.sr.ht/~edwlarkey/vim-toggler
Easy toggling between sets of keywords
This plugin makes it easier to toggle between different sets of keywords. E.g. [TODO, DOING, DONE], [YES, NO], [TRUE, FALSE], etc.
Inspiration came from Org Mode. I didn't really need all of the functionality that it provided, but I did like how it could toggle between TODO and DONE for tasks. About halfway through writting this plugin, I found vim-cycle which did almost everything I wanted.
There are no default mappings. There is simply one command.
:Toggle Toggles to next keyword found on the current line.
Use whatever method you used to install your other plugins. I use vim-plug. Vundle and Pathogen work great too.
Lists of keywords can be set in your vimrc.
The default set of keywords are:
let g:toggler_keywords = [
\ ['TODO', 'DOING', 'DONE'],
\ ['Positive', 'Negative'],
\ ['True', 'False'],
\ ['YES', 'NO'],
\ ['\[ \]', '\[x\]'],
\]
This is what I use in my vimrc. I have a modified set of keywords as well as t mapped to :Toggle
:nnoremap <leader>t :Toggle<CR>
let g:toggler_keywords = [
\ ['TODO', 'DOING', 'DONE'],
\ ['YES', 'NO'],
\ ['\[ \]', '\[x\]'],
\]
Distributed under the same terms as Vim. :help license