Skip to content

Instantly share code, notes, and snippets.

@linuxcaffe

linuxcaffe/.vimrc

Created Aug 27, 2015
Embed
What would you like to do?
" Unite taskwarrior options
command! Tw :Unite taskwarrior
let g:unite_taskwarrior_filter = ['status.not:deleted', 'status.not:completed']
let g:unite_taskwarrior_note_directory = '~/.task/notes'
let g:unite_taskwarrior_note_suffix = 'tasknote.wiki'
let g:unite_taskwarrior_define_mappings = 1
let g:unite_taskwarrior_projects_abbr = ''
let g:unite_taskwarrior_tags = '+'
command! -nargs=* -range=0 Tw
\ call s:call_taskwarrior(<q-args>)
"
call unite#custom#source('taskwarrior', 'matchers', 'matcher_fuzzy')
call unite#custom#source('taskwarrior', 'sorters', 'sorter_rank')
nnoremap <silent> <Leader>T :Unite taskwarrior -winheight=50<CR>
nnoremap <Leader>Ta :UniteTaskWarriorAdd<CR>
vnoremap <silent> <Leader>Ta :B UniteTaskWarriorAdd<CR>
nnoremap <silent> <Leader>Tt :Unite taskwarrior/tags -vertical -winwidth=40<CR>
nnoremap <silent> <Leader>Tp :Unite taskwarrior/projects -vertical -winwidth=50<CR>
nnoremap <Leader>TA :UniteTaskWarriorAnnotate<CR>
nnoremap <silent> <Leader>T@ :Unite taskwarrior/context -vertical -winwidth=30<CR>
nnoremap <silent> <Leader>Tn :Unite taskwarrior/notes -vertical -winwidth=50<CR>
nnoremap <silent> <Leader>TT :Unite source -input=taskwarrior<CR>
nnoremap <silent><buffer><expr> <TAB> unite#do_action('toggle')
nnoremap <silent><buffer><expr> <CR> unite#do_action('view')
nnoremap <silent><buffer><expr> d unite#do_action('do')
nnoremap <silent><buffer><expr> D unite#do_action('delete')
nnoremap <silent><buffer><expr> P unite#do_action('edit_proj')
nnoremap <silent><buffer><expr> A unite#do_action('annotate')
nnoremap <silent><buffer><expr> m unite#do_action('modify')
nnoremap <silent><buffer><expr> e unite#do_action('edit')
nnoremap <silent><buffer><expr> + unite#do_action('start')
nnoremap <silent><buffer><expr> - unite#do_action('stop')
function! s:call_taskwarrior(args) abort
let source = ['taskwarrior']
call extend(source, split(a:args))
call unite#start([source])
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment