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
1 changed files with 4 additions and 4 deletions

View File

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