Giter Site home page Giter Site logo

tomtom / vikitasks_vim Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 3.0 461 KB

Search viki files for tasks and display them in a list

Home Page: http://www.vim.org/scripts/script.php?script_id=2894

License: GNU General Public License v3.0

Vim Script 100.00%

vikitasks_vim's Introduction

NOTE: This plugin is not actively maintained any more. I now think it was a 
mistake to mix text & todo/priority lists this way. My preferred solution for 
such lists now is https://github.com/tomtom/ttodo_vim/ and other 
todo.txt-related apps.

This plugin provides a quick overview of priority/task lists maintained 
in different viki files. Depending on your settings, you can quickly 
search all "homepages" of intervikis or search only project-specific 
files.


Usage:
    :VikiTasks[!] [CONSTRAINT] [PATTERN] [FILE_PATTERNS]


Features:
    - Collect tasks from viki's priority lists (see |viki-tasks|)
    - Sort those tasks
    - Browse tasks with a given date
    - Optionally browse all tasks (incl. those without a date)

Demo:
http://vimsomnia.blogspot.com/2010/11/vikitasks-viki-demonstration-personal.html 

-----------------------------------------------------------------------
Tutorial: How does it work?~

Let's say you have the files:

foo.txt: >
    * Foo
        #A 2009-12-13 Do this
        #C 2009-12-20 Call @Anna
        #A Whatever

bar.txt: >
    * Bar
        #C 2009-12-24 Wish @Bernie good luck
        #D 2009-11-01 Do that

Let's assume you have added both files to |g:vikitasks#files|. Switch to 
the buffer foo.txt and call >

    :VikiTasks

and you get the following list: >

    Bar.txt|2| #D 2009-11-01 Do that
    Foo.txt|2| #A 2009-12-13 Do this
    Foo.txt|3| #C 2009-12-20 Call @Anna
    Bar.txt|3| #C 2009-12-24 Wish @Bernie good luck

If you do/had done this on the 15 December 2009, the third line would be 
highlighted, i.e. the entries above the cursor refer to passed/missed 
events. If you had called :VikiTasks! (behold the bang), then the 
"Whatever" entry would have been included in the list too.

If you had called >
    
    :VikiTasks current

only the first two items would be listed.

This week's tasks (i.e. the tasks that should be accomplished today or 
within the following six days) can be listed with >
    
    :VikiTasks 6


-----------------------------------------------------------------------
Install~

Edit the vba file and type: >

    :so %

See :help vimball for details. If you have difficulties or use vim 7.0, 
please make sure that you have the current version of vimball
(vimscript #1502) installed, or update your runtime.

This script requires tlib (vimscript #1863), trag (vimscript #2033), and 
viki (vimscript #861) to be installed.

Also available via git: http://github.com/tomtom/vikitasks_vim/




Dependencies:
  tlib (>= 1.16) :: http://github.com/tomtom/tlib_vim

  trag (>= 1.02) :: http://github.com/tomtom/trag_vim

License: GPLv3 or later


vikitasks_vim's People

Contributors

jean avatar tomtom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

xl42ii tazjel jean

vikitasks_vim's Issues

:VikiTasks does not ignore completed tasks

Hi,

I found this one little thing in your nice tools: viki-syntax allows to mark a task as completed by adding an 'x', but vikitasks seems to ignore this.
Is it possible to make it aware of completed tasks and filter them out?

Cannot get the plugin to work

Hi,

I've got an interviki with tasks, but calling VikiTasks yields 'No task files' message. Below is my setup, any idea what am I doing wrong?

let g:vikiNameSuffix = ".viki"
let g:viki_intervikis = {}
let g:viki_intervikis['V']  = [$HOME."/btsync/wiki", ".viki", "index.viki"]
nnoremap <leader>v :V<cr>
augroup ft_viki
        autocmd BufRead,BufNewFile $HOME/btsync/wiki/* set filetype=viki
        autocmd BufRead,BufNewFile $HOME/btsync/wiki/* nnoremap <silent> <CR> :VikiJump<cr>
        autocmd BufRead,BufNewFile $HOME/btsync/wiki/* nnoremap <silent> <BS> :VikiGoBack<cr>
        autocmd BufRead,BufNewFile $HOME/btsync/wiki/* nnoremap <silent> <Tab> :VikiFindNext<cr>
        autocmd BufRead,BufNewFile $HOME/btsync/wiki/* nnoremap <silent> <S-Tab> :VikiFindPrev<cr>
        autocmd FileType viki set ai sw=4 sts=4 et
augroup END
let g:vikitasks#intervikis = 2

if scrolloff is set :VikiTasks will have hidden elements

I have scrolloff set to 5, when I call :VikiTasks and move down the list, the marking dissapears at the end of the list, when 1 move down 5 more lines, the list begins to scroll down, but I can never see the bottom lines.

Copying contents of tasks search to current buffer

Apologies if this is completely obvious, but I'm struggling to figure it out.

Is there a way to have the contents of a VikiTasks search be output into the current buffer, rather than a quickfix list?

e.g. I might run

:VikiTasks @bob

and then format the text a bit in the buffer and then print it off.

error while using VikiTasks

when using :VikiTasks and select one of the tasks to jump to its location in my viki-files I get the following error:

Error detected while processing function vikitasks#Tasks..<SNR>103_TasksList..<SNR>103_FilterTasks:
line   16:
E872: (NFA regexp) Too many '('
E51: Too many \(
Error detected while processing function vikitasks#Tasks..<SNR>103_TasksList..<SNR>103_SortTasks..<SNR>103_GetTaskDu
eDate:
line    1:
E872: (NFA regexp) Too many '('
E51: Too many \(

where the last two lines of error repeat seemingly endlessly.
Any idea what's wrong or how I can help debug this?

current version :VikiTasks gives error

the following error is produced when calling :VikiTasts in my main-Viki-file:

Error detected while processing function vikitasks#Tasks..<SNR>95_TasksList..<SNR>95_View..trag#QuickList..trag#BrowseL
ist..tlib#eval#Extend:
line    6:
E704: Funcref variable name must start with a capital: v
Error detected while processing function vikitasks#Tasks..<SNR>95_TasksList..<SNR>95_View..trag#QuickList..trag#BrowseL
ist..tlib#qfl#QflList..tlib#eval#Extend:
line    2:
E605: Exception not caught: tlib#eval#Extend: Incompatible types: a={'query': 'Select entry', 'tlib_UseInputListScratch
': 'call tlib#qfl#InitListBuffer(world)', 'pick_last_item': 0, 'return_agent': 'tlib#qfl#AgentEditQFE', 'key_handlers':
 [{'help': 'Run a command on selected lines', 'agent': 'tlib#qfl#AgentWithSelected', 'key': 5, 'key_name': '<c-e>'}, {'
help': 'Preview', 'agent': 'tlib#qfl#AgentPreviewQFE', 'key': 16, 'key_name': '<c-p>'}, {'help': 'Jump (don''t close th
e list)', 'agent': 'tlib#qfl#AgentGotoQFE', 'key': 60, 'key_name': '<'}, {'help': 'Show in split buffer', 'agent': 'tli
b#qfl#AgentSplitBuffer', 'key': 19, 'key_name': '<c-s>'}, {'help': 'Show in tab', 'agent': 'tlib#qfl#AgentTabBuffer', '
key': 20, 'key_name': '<c-t>'}, {'help': 'Show in vsplit buffer', 'agent': 'tlib#qfl#AgentVSplitBuffer', 'key': 22, 'ke
y_name': '<c-v>'}, {'help': 'Edit selected line(s)', 'agent': 'tlib#qfl#AgentEditLine', 'key': 12, 'key_name': '<c-l>'}
, {'help': 'Toggle trace cursor', 'agent': 'tlib#qfl#SetFollowCursor', '
Error detected while processing function vikitasks#Tasks..<SNR>95_TasksList..<SNR>95_View..trag#QuickList..trag#BrowseL
ist..tlib#qfl#QflList:
line    8:
E171: Missing :endif
Error detected while processing function vikitasks#Tasks..<SNR>95_TasksList..<SNR>95_View:
line   10:
E171: Missing :endif
Error detected while processing function vikitasks#Tasks..<SNR>95_TasksList:
line    8:
E171: Missing :endif
Error detected while processing function vikitasks#Tasks:
line    5:
E171: Missing :endif

I have to admit, that I am not very good at reading those, but will try to isolate the reason for this error.

syntax highlighting of tasks

I am not sure, but were tasks highlighted in an older version of viki? Is it possible to get this back if it ever was highlighted?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.