sponsor Vim development Vim logo Vim Book Ad

vim-todo-lists : Plugin for TODO lists management

 script karma  Rating 1/1, Downloaded by 201    Comments, bugs, improvements  Vim wiki

created by
Alexander Serebryakov
 
script type
utility
 
description
Plugin is automatically applied for files with `.todo` extension.

##### TODO Items

The sequence matching the expression '^\s*[ ].*' marks a line as a TODO list item.

###### Example

```
  [ ] Not done
  [X] Done
```

##### 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:
* 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 done
  parent will also be marked as not done

##### 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

* `: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)

##### Default key mappings

###### Item editing mode

* `j` - go to next item
* `k` - go to previous item
* `o` - create new item above the cursor
* `O` - create new item below the cursor
* `<Space>` - toggle current item
* `<CR>` - create new item in `insert mode`
* `<leader>e` - switch to normal editing mode

###### Normal editing mode

* `j`, `k`, `o`, `O`, `<CR>` - no special behavior
* `<Space>` - toggle current item
* `<leader>e` - switch to item 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
```

Future features
---------------

* TODO lists folder selection
* Create new TODO list
* Archive current TODO list in the folder
* Show archived lists
* Open list from archive

Contribution
------------

Source code and issues are hosted on GitHub:

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

License
-------

[MIT License](https://opensource.org/licenses/MIT)
 
install details
##### 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.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-todo-lists-0.6.0.zip 0.6.0 2017-09-28 7.4 Alexander Serebryakov * Adds items moving on state change
vim-todo-lists-0.5.1.zip 0.5.1 2017-09-04 7.4 Alexander Serebryakov * Fixed the annoying noise when navigating over items in default mode
* Fixed the cursor position after the item is toggled
vim-todo-lists-0.5.0.zip 0.5.0 2017-09-02 7.4 Alexander Serebryakov * Added items highlighting
vim-todo-lists-0.4.0.zip 0.4.0 2017-08-28 7.4 Alexander Serebryakov * Added items hierarchy support
vim-todo-lists-0.3.0.zip 0.3.0 2017-08-20 7.4 Alexander Serebryakov * 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
vim-todo-lists-0.2.0.zip 0.2.0 2017-07-23 7.4 Alexander Serebryakov * Adds an option to configure custom key mappings
vim-todo-lists-0.1.1.zip 0.1.1 2017-07-19 7.4 Alexander Serebryakov Fixes broken compatibility with the 'filestyle' plugin
vim-todo-lists-0.1.0.zip 0.1.0 2017-07-05 7.4 Alexander Serebryakov Initial upload
ip used for rating: 54.161.108.158

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo