Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41a75a8f50 | ||
|
|
f3a3bdbefb |
@@ -15,7 +15,7 @@
|
|||||||
1. [Release notes](#release-notes)
|
1. [Release notes](#release-notes)
|
||||||
2. [Introduction](#introduction)
|
2. [Introduction](#introduction)
|
||||||
1. [Todo.txt rules](#todo.txt-rules)
|
1. [Todo.txt rules](#todo.txt-rules)
|
||||||
2. [Why this Fork ?](#Why-this-fork-?)
|
2. [Why this Fork ?](#Why-this-fork)
|
||||||
3. [Installation](#installation)
|
3. [Installation](#installation)
|
||||||
3. [TodoTxt Files](#todotxt-files)
|
3. [TodoTxt Files](#todotxt-files)
|
||||||
4. [Completion](#completion)
|
4. [Completion](#completion)
|
||||||
@@ -182,6 +182,13 @@ For more information on the available flags see `help :sort`
|
|||||||
|
|
||||||
## Mappings
|
## Mappings
|
||||||
|
|
||||||
|
By default todo-txt.vim set all the mappings secribed in this section. To
|
||||||
|
prevent this behavior, add the following line to your vimrc
|
||||||
|
|
||||||
|
let g:Todo_txt_do_not_map=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
`<LocalLeader>` is \ by default, so ̀`<LocaLeader>-s` means you type \s
|
`<LocalLeader>` is \ by default, so ̀`<LocaLeader>-s` means you type \s
|
||||||
|
|
||||||
### Sort
|
### Sort
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ function! todo#MarkAsDone(status)
|
|||||||
normal! Ix
|
normal! Ix
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! todo#MarkAllAsDone()
|
function! todo#MarkAllAsDone()
|
||||||
:g!/^x /:call todo#MarkAsDone('')
|
:g!/^x /:call todo#MarkAsDone('')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
@@ -191,6 +191,12 @@ For more information on the available flags see |:sort|
|
|||||||
===============================================================================
|
===============================================================================
|
||||||
6. Mappings *TodoTxt-Mappings* ~
|
6. Mappings *TodoTxt-Mappings* ~
|
||||||
|
|
||||||
|
By default todo-txt.vim set all the mappings secribed in this section. To
|
||||||
|
prevent this behavior, add the following line to your vimrc
|
||||||
|
>
|
||||||
|
let g:Todo_txt_do_not_map=1
|
||||||
|
<
|
||||||
|
|
||||||
6.1 Sort *TodoTxt-Sort*
|
6.1 Sort *TodoTxt-Sort*
|
||||||
|
|
||||||
`<LocalLeader>s` : Sort the file by priority
|
`<LocalLeader>s` : Sort the file by priority
|
||||||
|
|||||||
@@ -19,139 +19,50 @@ setlocal wrapmargin=0
|
|||||||
|
|
||||||
" Mappings {{{1
|
" Mappings {{{1
|
||||||
|
|
||||||
|
if !exists("g:Todo_txt_do_not_map")
|
||||||
" Sort todo by (first) context
|
" Sort todo by (first) context
|
||||||
if !hasmapto("<localleader>sc",'n')
|
|
||||||
noremap <silent><localleader>sc :call todo#HierarchicalSort('@', '', 1)<CR>
|
noremap <silent><localleader>sc :call todo#HierarchicalSort('@', '', 1)<CR>
|
||||||
endif
|
|
||||||
if !hasmapto("<localleader>scp",'n')
|
|
||||||
noremap <silent><localleader>scp :call todo#HierarchicalSort('@', '+', 1)<CR>
|
|
||||||
endif
|
|
||||||
" Sort todo by (first) project
|
|
||||||
if !hasmapto("<localleader>sp",'n')
|
|
||||||
noremap <silent><localleader>sp :call todo#HierarchicalSort('+', '',1)<CR>
|
|
||||||
endif
|
|
||||||
if !hasmapto("<localleader>spc",'n')
|
|
||||||
noremap <silent><localleader>spc :call todo#HierarchicalSort('+', '@',1)<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
noremap <silent><localleader>scp :call todo#HierarchicalSort('@', '+', 1)<CR>
|
||||||
|
" Sort todo by (first) project
|
||||||
|
noremap <silent><localleader>sp :call todo#HierarchicalSort('+', '',1)<CR>
|
||||||
|
noremap <silent><localleader>spc :call todo#HierarchicalSort('+', '@',1)<CR>
|
||||||
|
|
||||||
" Sort tasks {{{2
|
" Sort tasks {{{2
|
||||||
if !hasmapto("<localleader>s",'n')
|
|
||||||
nnoremap <script> <silent> <buffer> <LocalLeader>s :call todo#Sort()<CR>
|
nnoremap <script> <silent> <buffer> <LocalLeader>s :call todo#Sort()<CR>
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>s@",'n')
|
|
||||||
nnoremap <script> <silent> <buffer> <LocalLeader>s@ :sort /.\{-}\ze@/ <CR>
|
nnoremap <script> <silent> <buffer> <LocalLeader>s@ :sort /.\{-}\ze@/ <CR>
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>s+",'n')
|
|
||||||
nnoremap <script> <silent> <buffer> <LocalLeader>s+ :sort /.\{-}\ze+/ <CR>
|
nnoremap <script> <silent> <buffer> <LocalLeader>s+ :sort /.\{-}\ze+/ <CR>
|
||||||
endif
|
" Priorities {{{2
|
||||||
|
noremap <script> <silent> <buffer> <LocalLeader>j :call todo#PrioritizeIncrease()<CR>
|
||||||
|
noremap <script> <silent> <buffer> <LocalLeader>k :call todo#PrioritizeDecrease()<CR>
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>j",'n')
|
noremap <script> <silent> <buffer> <LocalLeader>a :call todo#PrioritizeAdd('A')<CR>
|
||||||
nnoremap <script> <silent> <buffer> <LocalLeader>j :call todo#PrioritizeIncrease()<CR>
|
noremap <script> <silent> <buffer> <LocalLeader>b :call todo#PrioritizeAdd('B')<CR>
|
||||||
endif
|
noremap <script> <silent> <buffer> <LocalLeader>c :call todo#PrioritizeAdd('C')<CR>
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>j",'v')
|
|
||||||
vnoremap <script> <silent> <buffer> <LocalLeader>j :call todo#PrioritizeIncrease()<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>k",'n')
|
|
||||||
nnoremap <script> <silent> <buffer> <LocalLeader>k :call todo#PrioritizeDecrease()<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>k",'v')
|
|
||||||
vnoremap <script> <silent> <buffer> <LocalLeader>k :call todo#PrioritizeDecrease()<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>a",'n')
|
|
||||||
nnoremap <script> <silent> <buffer> <LocalLeader>a :call todo#PrioritizeAdd('A')<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>a",'i')
|
|
||||||
inoremap <script> <silent> <buffer> <LocalLeader>a <ESC>:call todo#PrioritizeAdd('A')<CR>i
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>a",'v')
|
|
||||||
vnoremap <script> <silent> <buffer> <LocalLeader>a :call todo#PrioritizeAdd('A')<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>b",'n')
|
|
||||||
nnoremap <script> <silent> <buffer> <LocalLeader>b :call todo#PrioritizeAdd('B')<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>b",'i')
|
|
||||||
inoremap <script> <silent> <buffer> <LocalLeader>b <ESC>:call todo#PrioritizeAdd('B')<CR>i
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>b",'v')
|
|
||||||
vnoremap <script> <silent> <buffer> <LocalLeader>b :call todo#PrioritizeAdd('B')<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>c",'n')
|
|
||||||
nnoremap <script> <silent> <buffer> <LocalLeader>c :call todo#PrioritizeAdd('C')<CR>
|
|
||||||
endif
|
|
||||||
if !hasmapto("<LocalLeader>c",'i')
|
|
||||||
inoremap <script> <silent> <buffer> <LocalLeader>c <ESC>:call todo#PrioritizeAdd('C')<CR>i
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<LocalLeader>c",'v')
|
|
||||||
vnoremap <script> <silent> <buffer> <LocalLeader>c :call todo#PrioritizeAdd('C')<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Insert date {{{2
|
" Insert date {{{2
|
||||||
if !hasmapto("date<Tab>",'i')
|
|
||||||
inoremap <script> <silent> <buffer> date<Tab> <C-R>=strftime("%Y-%m-%d")<CR>
|
inoremap <script> <silent> <buffer> date<Tab> <C-R>=strftime("%Y-%m-%d")<CR>
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("due:",'i')
|
|
||||||
inoremap <script> <silent> <buffer> due: due:<C-R>=strftime("%Y-%m-%d")<CR>
|
inoremap <script> <silent> <buffer> due: due:<C-R>=strftime("%Y-%m-%d")<CR>
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("DUE:",'i')
|
|
||||||
inoremap <script> <silent> <buffer> DUE: DUE:<C-R>=strftime("%Y-%m-%d")<CR>
|
inoremap <script> <silent> <buffer> DUE: DUE:<C-R>=strftime("%Y-%m-%d")<CR>
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<localleader>d",'n')
|
noremap <script> <silent> <buffer> <localleader>d :call todo#PrependDate()<CR>
|
||||||
nnoremap <script> <silent> <buffer> <localleader>d :call todo#PrependDate()<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<localleader>d",'v')
|
|
||||||
vnoremap <script> <silent> <buffer> <localleader>d :call todo#PrependDate()<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Mark done {{{2
|
" Mark done {{{2
|
||||||
if !hasmapto("<localleader>x",'n')
|
noremap <script> <silent> <buffer> <localleader>x :call todo#ToggleMarkAsDone('')<CR>
|
||||||
nnoremap <script> <silent> <buffer> <localleader>x :call todo#ToggleMarkAsDone('')<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<localleader>x",'v')
|
|
||||||
vnoremap <script> <silent> <buffer> <localleader>x :call todo#ToggleMarkAsDone('')<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Mark done {{{2
|
" Mark done {{{2
|
||||||
if !hasmapto("<localleader>C",'n')
|
noremap <script> <silent> <buffer> <localleader>C :call todo#ToggleMarkAsDone('Cancelled')<CR>
|
||||||
nnoremap <script> <silent> <buffer> <localleader>C :call todo#ToggleMarkAsDone('Cancelled')<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
if !hasmapto("<localleader>C",'v')
|
|
||||||
vnoremap <script> <silent> <buffer> <localleader>C :call todo#ToggleMarkAsDone('Cancelled')<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" Mark all done {{{2
|
" Mark all done {{{2
|
||||||
if !hasmapto("<localleader>X",'n')
|
noremap <script> <silent> <buffer> <localleader>X :call todo#MarkAllAsDone()<CR>
|
||||||
nnoremap <script> <silent> <buffer> <localleader>X :call todo#MarkAllAsDone('')<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Remove completed {{{2
|
" Remove completed {{{2
|
||||||
if !hasmapto("<localleader>D",'n')
|
|
||||||
nnoremap <script> <silent> <buffer> <localleader>D :call todo#RemoveCompleted()<CR>
|
nnoremap <script> <silent> <buffer> <localleader>D :call todo#RemoveCompleted()<CR>
|
||||||
endif
|
|
||||||
|
|
||||||
" Sort by due: date {{{2
|
" Sort by due: date {{{2
|
||||||
if !hasmapto("<localleader>sd".'n')
|
|
||||||
nnoremap <script> <silent> <buffer> <localleader>sd :call todo#SortDue()<CR>
|
nnoremap <script> <silent> <buffer> <localleader>sd :call todo#SortDue()<CR>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user