VIM: Making Markdown Checklist Shortcut

Interesting exercise to implement shortcut in vim. Often while writing markdown files in vim I’m writing a lot of checkboxes. It’s a bit annoying to do by hand so let’s make a script and bind it to shortcut. """ markdown shortcuts function MarkdownCheckboxInsert() let l:line = line('.') let l:str = getline(l:line) let l:match = matchlist(l:str, '^\([ ]*\)\?\([-+*]\)\? \?\(.*\)$') if empty(l:match[2]) let l:list_syn = '-' else let l:list_syn = l:match[2] endif let l:buf = l:match[1] ....

October 14, 2020