An intuitive TODO List written in pure VimL
Demo recorded in Neovim using onedark.vim
Add todo.vim to your vimrc:
Plug 'ianding1/todo.vim'
todo.vim doesn't bind any key mappings by default.
" Jump to the next TODO item (skipping DONE items).
nmap <silent> <leader>tn <Plug>(todo-next)
" Jump to the previous TODO item (skipping DONE items).
nmap <silent> <leader>tp <Plug>(todo-prev)
" List all TODO items in the location list. See `:h location-list`.
nmap <silent> <leader>tl <Plug>(todo-list)
" Use TAB to toggle the item between TODO and DONE.
nmap <silent> <expr> <tab> todo#IsTodo() ? "\<Plug>(todo-toggle)" : "\<tab>"Note: Don't use nnoremap to map these keys. Use double quotes instead of
single quotes. And don't forget the backslashes.
- todo.vim uses folding to collapse DONE items. The most basic commands
are
zoto open a fold andzcto close a fold. See:h foldingfor details. If you want to disable this feature, addlet g:todo_done_folded = 0to your vimrc. - todo.vim uses location list to list all the TODO items in the buffer,
which are sorted by the priority (the number of
!after[ ], at most 3).
" Set to 0 to disable folding DONE items (enabled by default).
let g:todo_done_folded = 1If the last line of the todo file contains // todo.vim: autogitsync, then
each time the file is opened, todo.vim will do git-pull, and each time the file
is written, todo.vim will commit all the changes and do git-push. This can
be very help with Gist to maintain a cloud todo list.
