Detect markdown-style todos in vim Todo command

This commit is contained in:
Talia 2021-10-26 12:42:26 +02:00
parent b9aa577c59
commit 3eb17dd9ff

View file

@ -474,10 +474,10 @@ function! s:snapshot()
endfun endfun
command! Snapshot call <sid>snapshot() command! Snapshot call <sid>snapshot()
command! Todo call matchadd('Todo', '^\s*\[ \?\].*$') | command! Todo call matchadd('Todo', '^[ -]*\[ \?\].*$') |
\ call matchadd('Comment', '^\s*\[x\].*$') | \ call matchadd('Comment', '^[ -]*\[x\].*$') |
\ call matchadd('Comment', '^\s*\[-\].*$') | \ call matchadd('Comment', '^[ -]*\[-\].*$') |
\ call matchadd('Error', '^\s*\[!\].*$') \ call matchadd('Error', '^[ -]*\[!\].*$')
command! -nargs=? Tempfile exec 'new '.tempname() | set filetype=<args> | au BufDelete <buffer> call delete(expand('%')) command! -nargs=? Tempfile exec 'new '.tempname() | set filetype=<args> | au BufDelete <buffer> call delete(expand('%'))
" ┌──────────────────────────┐ " ┌──────────────────────────┐