commit 2d788b38437b17b30f82aa9a34fa0094e10e791a
parent 457738e647a145a232539eb1e6af81f837ab4b25
Author: Alex Balgavy <alex@balgavy.eu>
Date: Sun, 17 Jul 2022 14:53:37 +0200
vim: improve todo command
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/vim/after/ftplugin/tex.vim b/vim/after/ftplugin/tex.vim
@@ -9,6 +9,8 @@ inoremap <buffer> ; ;<c-g>u
inoremap <buffer> - -<c-g>u
setlocal formatoptions-=cat wrap
+command! -buffer Todo Ag \\?((TO ?DO)|FIXME)[:{]<space>?
+
" Set up folding. By default use indent, fdm=expr can be set in modeline.
setlocal foldmethod=indent
setlocal foldexpr=vimtex#fold#level(v:lnum)
diff --git a/vim/vimrc b/vim/vimrc
@@ -321,7 +321,7 @@ nmap <leader>J <Plug>FzfChangesJumpsJumps
nmap <leader>C <Plug>FzfChangesJumpsChanges
" Search for Todos/Fixmes
-command! Todo Ag ((TO ?DO)|FIXME):?<space>?
+command! Todo Ag ((TO ?DO)|FIXME):<space>
nnoremap <leader>! :Todo<CR>
" Set a filetype