- Notifications
You must be signed in to change notification settings - Fork26
aserebryakov/vim-todo-lists
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
vim-todo-lists is a Vim plugin for TODO lists management.
$ cd ~/.vim/bundle$ git clone https://github.com/aserebryakov/vim-todo-lists.git
NeoBundle 'aserebryakov/vim-todo-lists'
Clone or download this repository and copy its contents to your~/.vim/
directory.
Plugin is automatically applied for files with.todo.md
extension.
The following example represents TODO items definition by default.
- [ ] Not done- [X] Done
You can customize the representation of the item by defining the following variablesto your.vimrc
let g:VimTodoListsUndoneItem = '- [X]'let g:VimTodoListsDoneItem = '- [V]'
Important item is defined asundone item string !
.
- [ ] ! Important item
If one item has lesser indentation than the next one then the first one is meantto beparent and the second to bechild.
- [ ] Parent - [ ] Child1 - [ ] Child2
- Changing state of the parent item changes the state of all children items accordantly
- If all children items are marked done, parent will also be marked as done
- If parent is marked as done and one of the children changes state to not doneparent will also be marked as not done
Items are highlighted in accordance to the following scheme:
- [ ] ! Important item (Underlined)- [ ] Normal item (Normal)- [X] Done item (Comment)
By default item when its status is changed is moved in the list in accordanceto the following rules
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
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
This feature also affect the items in hierarchy in accordance to the rules above.
If you don't want items to be moved after state change, you may add the followingline into your.vimrc
file:
let g:VimTodoListsMoveItems = 0
:VimTodoListsCreateNewItemAbove
- creates a new item in a line above cursor:VimTodoListsCreateNewItemBelow
- creates a new item in a line below cursor:VimTodoListsCreateNewItem
- creates a new item in current line:VimTodoListsGoToNextItem
- go to the next item:VimTodoListsGoToPreviousItem
- go to the previous item:VimTodoListsToggleItem
- toggles the current item (or selected items in visual mode):VimTodoListsIncreaseIndent
- increases the indent of current line:VimTodoListsDecreaseIndent
- decreases the indent of current line
j
- go to next itemk
- go to previous itemO
- create new item above the cursoro
- create new item below the cursor<Space>
- toggle current item<CR>
- create new item ininsert mode
<Tab>
- increases the indent of current (or selected) line(s)<Shift-Tab>
- decreases the indent of current (or selected) line(s)<leader>e
- switch to normal editing mode
j
,k
,o
,O
,<CR>
- no special behavior<Space>
- toggle current item<leader>e
- switch to item editing mode
Theg:VimTodoListsCustomKeyMapper
variable should contain a name of the functionimplementing custom mappings.
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 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 validstrftime()
string:
let g:VimTodoListsDatesFormat = "%a %b, %Y"
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 usedev
branch forfunctionality implementation to simplify the merge procedure.
Breaking Change
- Added option to configure TODO items
- File extension changed to
.todo.md
from.todo
- Item indentation level is kept when creating a new one
- Removed migration from older formats
- Added plugin initialization for
todo
filetype - New item can be created with keypad Enter key
- Makes normal mode keys more consistent
- Syntax highlight is fixed
- Added automatic date insertion feature
- Added mappings for fast increasing/decreasing indent
- Items list are made markdown compatible (old files are updated automatically on load)
- Added items moving on state change
- Fixed the annoying noise when navigating over items in default mode
- Fixed the cursor position after the item is toggled
- Added items highlighting
- Added items hierarchy support
- Added items toggling in visual mode
- Improves work with indentations of list items
- Fixed the error when trying to navigate the buffer that doesn't contain items
- Added an option to configure custom key mappings
- Fixes broken compatibility with thefilestyle plugin
- Navigation in TODO list
- Adding new items
- Items toggling
About
Vim plugin for TODO lists
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.