Skip to content

Commit bbf8465

Browse files
committed
Updates the documentation (#3)
1 parent 1920e79 commit bbf8465

File tree

2 files changed

+107
-34
lines changed

2 files changed

+107
-34
lines changed

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,27 @@ Usage
2727

2828
Plugin is automatically applied for files with `.todo` extension.
2929

30-
##### Key bindings
30+
##### TODO Items
31+
32+
The ` [ ] ` sequence of characters marks a line as a TODO list item.
33+
34+
###### Example
35+
36+
```
37+
[ ] Not done
38+
[X] Done
39+
```
40+
41+
##### Commands
42+
43+
* `:VimTodoListsCreateNewItemAbove` - creates a new item in a line above cursor
44+
* `:VimTodoListsCreateNewItemBelow` - creates a new item in a line below cursor
45+
* `:VimTodoListsCreateNewItem` - creates a new item in current line
46+
* `:VimTodoListsGoToNextItem` - go to the next item
47+
* `:VimTodoListsGoToPreviousItem` - go to the previous item
48+
* `:VimTodoListsToggleItem` - toggles the item
49+
50+
##### Default key mappings
3151

3252
###### Item editing mode
3353

@@ -45,6 +65,23 @@ Plugin is automatically applied for files with `.todo` extension.
4565
* `<Space>` - toggle current item
4666
* `<leader>e` - switch to item editing mode
4767

68+
##### Custom key mappings
69+
70+
The `g:VimTodoListsCustomKeyMapper` variable should contain a name of the function
71+
implementing custom mappings.
72+
73+
###### Example
74+
75+
```
76+
let g:VimTodoListsCustomKeyMapper = 'VimTodoListsCustomMappings'
77+
78+
function! VimTodoListsCustomMappings()
79+
nnoremap <buffer> s :VimTodoListsToggleItem<CR>
80+
nnoremap <buffer> <Space> :VimTodoListsToggleItem<CR>
81+
noremap <buffer> <leader>e :silent call VimTodoListsSetItemMode()<CR>
82+
endfunction
83+
```
84+
4885
Future features
4986
---------------
5087

@@ -79,6 +116,10 @@ Changelog
79116

80117
* Fixes broken compatibility with the [filestyle](https://github.com/aserebryakov/filestyle) plugin
81118

119+
#### 0.2.0
120+
121+
* Adds an option to configure custom key mappings
122+
82123
Credits
83124
-------
84125

doc/vim-todo-lists.txt

Lines changed: 65 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
*vim-todo-lists.txt* Version 0.1.1
1+
*vim-todo-lists.txt* Version 0.2.0
22
*vim-todo-lists*
33

44
Plugin for TODO lists management.
55

66
==============================================================================
77
CONTENTS *VimTodoListsContents*
88

9-
1. Introduction .... |VimTodoListsIntroduction|
10-
2. Installation .... |VimTodoListsInstallation|
11-
3. Usage ........... |VimTodoListsUsage|
12-
4. Contribution .... |VimTodoListsContribution|
13-
5. Future Features.. |VimTodoListsFutureFeatures|
14-
6. License ......... |VimTodoListsLicense|
15-
7. Changelog ....... |VimTodoListsChangelog|
16-
8. Credits ......... |VimTodoListsCredits|
9+
1. Introduction .... |VimTodoListsIntroduction|
10+
2. Installation .... |VimTodoListsInstallation|
11+
3. Usage ........... |VimTodoListsUsage|
12+
4. Contribution .... |VimTodoListsContribution|
13+
5. Future Features.. |VimTodoListsFutureFeatures|
14+
6. License ......... |VimTodoListsLicense|
15+
7. Changelog ....... |VimTodoListsChangelog|
16+
8. Credits ......... |VimTodoListsCredits|
1717

1818
==============================================================================
1919
1. Introduction *VimTodoListsIntroduction*
@@ -29,41 +29,69 @@ See |VimTodoListsFutureFeatures|.
2929
2. Installation *VimTodoListsInstallation*
3030

3131
Pathogen:
32-
>
33-
$ cd ~/.vim/bundle
34-
$ git clone https://github.com/aserebryakov/vim-todo-lists.git
35-
<
32+
33+
$ cd ~/.vim/bundle
34+
$ git clone https://github.com/aserebryakov/vim-todo-lists.git
35+
3636
NeoBundle:
37-
>
38-
NeoBundle 'aserebryakov/vim-todo-lists'
39-
<
37+
38+
NeoBundle 'aserebryakov/vim-todo-lists'
39+
4040
Without plugin manager:
4141

42-
Clone or download this repository and copy its contents to your ~/.vim/
43-
directory.
42+
Clone or download this repository and copy its contents to your ~/.vim/
43+
directory.
4444

4545
==============================================================================
4646
3. Usage *VimTodoListsUsage*
4747

4848
Plugin is automatically applied for files with `.todo` extension.
4949

50-
Key bindings in item editing mode
51-
---------------------------------
50+
TODO Items
51+
----------
52+
53+
The ' [ ] ' sequence of characters marks a line as a TODO list item.
54+
55+
Example
56+
-------
57+
58+
[ ] Not done
59+
[X] Done
5260

53-
* j - go to next item
54-
* k - go to previous item
55-
* o - create new item above the cursor
56-
* O - create new item below the cursor
57-
* <Space> - toggle current item
58-
* <CR> - create new item in insert mode
59-
* <leader>e - switch to normal editing mode
61+
Commands
62+
--------
63+
*:VimTodoListsCreateNewItemAbove* *:VimTodoListsCreateNewItemBelow*
64+
*:VimTodoListsCreateNewItem* *:VimTodoListsGoToNextItem*
65+
*:VimTodoListsGoToPreviousItem* *:VimTodoListsToggleItem*
6066

61-
Key bindings in normal editing mode
62-
---------------------------------
67+
* :VimTodoListsCreateNewItemAbove - creates a new item in a line above cursor
68+
* :VimTodoListsCreateNewItemBelow - creates a new item in a line below cursor
69+
* :VimTodoListsCreateNewItem - creates a new item in current line
70+
* :VimTodoListsGoToNextItem - go to the next item
71+
* :VimTodoListsGoToPreviousItem - go to the previous item
72+
* :VimTodoListsToggleItem - toggles the item
6373

64-
* j, k, o, O, <CR> - no special behavior
65-
* <Space> - toggle current item
66-
* <leader>e - switch to item editing mode
74+
75+
Default key bindings
76+
--------------------
77+
78+
Item editing mode
79+
-----------------
80+
81+
* j - go to next item
82+
* k - go to previous item
83+
* o - create new item above the cursor
84+
* O - create new item below the cursor
85+
* <Space> - toggle current item
86+
* <CR> - create new item in insert mode
87+
* <leader>e - switch to normal editing mode
88+
89+
Normal editing mode
90+
-------------------
91+
92+
* j, k, o, O, <CR> - no special behavior
93+
* <Space> - toggle current item
94+
* <leader>e - switch to item editing mode
6795

6896
==============================================================================
6997
4. Future Features *VimTodoListsFutureFeatures*
@@ -79,7 +107,7 @@ Key bindings in normal editing mode
79107

80108
Source code and issues are hosted on GitHub:
81109

82-
https://github.com/aserebryakov/vim-todo-lists
110+
https://github.com/aserebryakov/vim-todo-lists
83111

84112
==============================================================================
85113
6. License *VimTodoListsLicense*
@@ -119,6 +147,10 @@ SOFTWARE.
119147

120148
* Fixes broken compatibility with the [filestyle] plugin
121149

150+
0.2.0
151+
152+
* Adds an option to configure custom key mappings
153+
122154
==============================================================================
123155
8. Credits *VimTodoListsCredits*
124156

0 commit comments

Comments
 (0)