mirror of
https://github.com/freitass/todo.txt-vim.git
synced 2025-11-16 13:53:47 -05:00
Merge pull request #19 from ha17/dev-sorting-priority-changing
Dev sorting priority changing
This commit is contained in:
@@ -10,6 +10,14 @@ mappings, to help with edition of these files:
|
|||||||
|
|
||||||
`<leader>-s` : Sort the file
|
`<leader>-s` : Sort the file
|
||||||
|
|
||||||
|
`<leader>-s+` : Sort the file on +Projects
|
||||||
|
|
||||||
|
`<leader>-s@` : Sort the file on @Contexts
|
||||||
|
|
||||||
|
`<leader>-j` : Lower the priority (cursor must by on priority)
|
||||||
|
|
||||||
|
`<leader>-k` : Increase the priority (cursor must by on priority)
|
||||||
|
|
||||||
`<leader>-d` : Insert the current date
|
`<leader>-d` : Insert the current date
|
||||||
|
|
||||||
`date<tab>` : (Insert mode) Insert the current date
|
`date<tab>` : (Insert mode) Insert the current date
|
||||||
|
|||||||
@@ -45,6 +45,41 @@ if !hasmapto("<leader>s",'n')
|
|||||||
if !hasmapto("<leader>s",'n')
|
if !hasmapto("<leader>s",'n')
|
||||||
nnoremap <script> <silent> <buffer> <leader>s :sort<CR>
|
nnoremap <script> <silent> <buffer> <leader>s :sort<CR>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !hasmapto("<leader>s@",'n')
|
||||||
|
nnoremap <script> <silent> <buffer> <leader>s@ :sort /.\{-}\ze@/ <CR>
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !hasmapto("<leader>s+",'n')
|
||||||
|
nnoremap <script> <silent> <buffer> <leader>s+ :sort /.\{-}\ze+/ <CR>
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Increment and Decrement The Priority
|
||||||
|
:set nf=octal,hex,alpha
|
||||||
|
|
||||||
|
function! TodoTxtPrioritizeIncrease()
|
||||||
|
normal! 0f)h
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! TodoTxtPrioritizeDecrease()
|
||||||
|
normal! 0f)h
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
if !hasmapto("<leader>j",'n')
|
||||||
|
nnoremap <script> <silent> <buffer> <leader>j :call TodoTxtPrioritizeIncrease()<CR>
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !hasmapto("<leader>j",'v')
|
||||||
|
vnoremap <script> <silent> <buffer> <leader>j :call TodoTxtPrioritizeIncrease()<CR>
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !hasmapto("<leader>k",'n')
|
||||||
|
nnoremap <script> <silent> <buffer> <leader>k :call TodoTxtPrioritizeDecrease()<CR>
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !hasmapto("<leader>k",'v')
|
||||||
|
vnoremap <script> <silent> <buffer> <leader>k :call TodoTxtPrioritizeDecrease()<CR>
|
||||||
|
endif
|
||||||
|
|
||||||
" Insert date {{{2
|
" Insert date {{{2
|
||||||
if !hasmapto("date<Tab>",'i')
|
if !hasmapto("date<Tab>",'i')
|
||||||
|
|||||||
Reference in New Issue
Block a user