From 7bfb0eb1dfb9d339b6e12f2f69b038d10c424340 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Mon, 27 May 2019 09:51:05 +0200 Subject: [PATCH] Add TODO functionality to vimrc - rename Todo to Todos - create new Todo command that opens a new file with some custom matches --- vimrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index 6e65e63..f2e16d5 100644 --- a/vimrc +++ b/vimrc @@ -353,8 +353,8 @@ command! QAddLine call QuickfixAddLine(expand("%"), line("."), getline(".")) command! LAddCursor call LocationAddLineCol(expand("%"), line("."), getline("."), col(".")) command! QAddCursor call QuickfixAddLineCol(expand("%"), line("."), getline("."), col(".")) -command! Fixme call setloclist(0, MatchingLinesDict("\\c\\)) command! -nargs=1 QFind call setqflist(MatchingLinesDict()) @@ -433,6 +433,10 @@ endfun command! Snapshot call snapshot() command! -nargs=? Scratch enew | set buftype=nofile | set filetype= +command! Todo enew | set buftype=nofile | set filetype=markdown | + \ call matchadd('Todo', '^\[ \?\].*$') | + \ call matchadd('Comment', '^\[x\].*$') | + \ call matchadd('Error', '^\[-\].*$') command! -nargs=? Tempfile exec 'new '.tempname() | set filetype= | au BufDelete call delete(expand('%')) " ┌──────────────────────────┐