Slim, configurable checkbox status switcher for Markdown list items.
Serves as a good little addition to common vim-markdown-plugins like preservim/vim-markdown.
Using a plugin manger like packer.nvim
use {
"tenxsoydev/vim-markdown-checkswitch",
ft = {
"markdown",
},
}
" Switch checkbox status for line, range, or visual selection
:CheckSwitch
" Cycle between NO checkbox, empty, and ticked checkboxes
" or toggle between empty and ticked checkboxes
let g:md_checkswitch_style = 'cycle' " or 'toggle'
" Default mapping <Alt-c>. For those who are familiar with Codiums 'Markdown All in One' plugin
" (can be disabled with `let g:md_checkswitch_default_mappings_off=1`)
nnoremap <silent> <A-c> :CheckSwitch<cr>
vnoremap <silent> <A-c> :CheckSwitch<cr>gv