From 3eb17dd9ff0f434d626e0219ccee685240e6fd05 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Tue, 26 Oct 2021 12:42:26 +0200 Subject: [PATCH] Detect markdown-style todos in vim Todo command --- vim/plugin/shame.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vim/plugin/shame.vim b/vim/plugin/shame.vim index 7671568..e0b836a 100644 --- a/vim/plugin/shame.vim +++ b/vim/plugin/shame.vim @@ -474,10 +474,10 @@ function! s:snapshot() endfun command! Snapshot call 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= | au BufDelete call delete(expand('%')) " ┌──────────────────────────┐