diff --git a/plugin/functions.vim b/plugin/functions.vim index a516276..f668e21 100644 --- a/plugin/functions.vim +++ b/plugin/functions.vim @@ -59,8 +59,8 @@ function! <SID>TabWidth(width) endfunction command! -nargs=1 TabWidth :call <SID>TabWidth(<f-args>) -" Toggle task list bullet -function! <SID>TaskToggle() +" Toggle GitHub style bullet checkbox +function! <SID>CheckboxToggle() " Get current line let l:line = getline('.') @@ -78,9 +78,5 @@ function! <SID>TaskToggle() " Replace the current line with a new one call setline(line('.'), substitute(l:line, l:pattern, l:char, '')) endfunction -command! TaskToggle :call <SID>TaskToggle() -nnoremap <leader>x :TaskToggle<CR> - -" {Dis,En}able macro mode, use <CR> to repeat last macro -command! MacroModeEnable :call macro_mode#enable() -command! MacroModeDisable :call macro_mode#disable() +command! CheckboxToggle :call <SID>CheckboxToggle() +nnoremap <leader><CR> :CheckboxToggle<CR>