Home

Awesome

vim-todo-lists

vim-todo-lists is a Vim plugin for TODO lists management.

Installation

Install vim-todo-lists

Pathogen
$ cd ~/.vim/bundle
$ git clone https://github.com/aserebryakov/vim-todo-lists.git
NeoBundle
NeoBundle 'aserebryakov/vim-todo-lists'
Without plugin manager

Clone or download this repository and copy its contents to your ~/.vim/ directory.

Usage

Plugin is automatically applied for files with .todo.md extension.

TODO Items

The following example represents TODO items definition by default.

Example
- [ ] Not done
- [X] Done
Custom Configuration

You can customize the representation of the item by defining the following variables to your .vimrc

let g:VimTodoListsUndoneItem = '- [X]'
let g:VimTodoListsDoneItem = '- [V]'
Important Item

Important item is defined as undone item string !.

- [ ] ! Important item
Items Hierarchy

If one item has lesser indentation than the next one then the first one is meant to be parent and the second to be child.

Example
- [ ] Parent
  - [ ] Child1
  - [ ] Child2
Rules:
Items Highlighting

Items are highlighted in accordance to the following scheme:

- [ ] ! Important item (Underlined)
- [ ] Normal item (Normal)
- [X] Done item (Comment)
Items moving on state change

By default item when its status is changed is moved in the list in accordance to the following rules

Mark item done

Item marked as done is moved to the end of all done items list. If done list doesn't exist, item is placed just after the last not done item.

Before

- [ ] Not Done 1
- [ ] Will be done now
- [ ] Not Done 2
- [X] Done

After

- [ ] Not Done 1
- [ ] Not Done 2
- [X] Done
- [X] Will be done now
Mark item undone

Undone item is moved to the end of all not done items list. If all items are marked done, the items is moved before the first done item.

Before

- [ ] Not Done 1
- [ ] Not Done 2
- [X] Done
- [X] Will be undone now

After

- [ ] Not Done 1
- [ ] Not Done 2
- [ ] Will be done now
- [X] Done
Interaction with items hierarchy

This feature also affect the items in hierarchy in accordance to the rules above.

Disable the items moving

If you don't want items to be moved after state change, you may add the following line into your .vimrc file:

let g:VimTodoListsMoveItems = 0
Commands
Default key mappings
Item editing mode
Normal editing mode
Custom key mappings

The g:VimTodoListsCustomKeyMapper variable should contain a name of the function implementing custom mappings.

Example
let g:VimTodoListsCustomKeyMapper = 'VimTodoListsCustomMappings'

function! VimTodoListsCustomMappings()
  nnoremap <buffer> s :VimTodoListsToggleItem<CR>
  nnoremap <buffer> <Space> :VimTodoListsToggleItem<CR>
  noremap <buffer> <leader>e :silent call VimTodoListsSetItemMode()<CR>
endfunction
Automatic date insertion

Automatic date insertion may be enabled by setting the following in .vimrc:

let g:VimTodoListsDatesEnabled = 1

Date format may be changed by setting the format variable to a valid strftime() string:

let g:VimTodoListsDatesFormat = "%a %b, %Y"

Contribution

Source code and issues are hosted on GitHub:

https://github.com/aserebryakov/vim-todo-lists

If you are going to make a pull request, you should use dev branch for functionality implementation to simplify the merge procedure.

License

MIT License

Changelog

0.8.0

Breaking Change

0.7.1

0.7.0

0.6.0

0.5.1

0.5.0

0.4.0

0.3.0

0.2.0

0.1.1

0.1.0

Contributors