vim-taskwarrior icon indicating copy to clipboard operation
vim-taskwarrior copied to clipboard

g:task_report_command should include user-defined reports

Open kartynnik opened this issue 11 years ago • 5 comments

Now g:task_report_command contains only predefined reports. Ideally it should contain everything task report returns, including the user-defined reports from .taskrc.

kartynnik avatar Dec 27 '14 01:12 kartynnik

task report returns many undesired commands, I'll just allow users to specify their own g:task_report_command. For example, If you want to add the command my-command, just put let g:task_report_command = ['my-command'] in your vimrc.

blindFS avatar Dec 27 '14 03:12 blindFS

That's just what I was doing via autocmd and +=. I still believe that the user could wish to see her own custom .taskrc-defined reports there automatically.

kartynnik avatar Dec 27 '14 03:12 kartynnik

Well, automation is good, but using task report to get it is not a good approach, in my perspective. I want to keep the init process simple and fast.

blindFS avatar Dec 27 '14 05:12 blindFS

Perhaps parsing .taskrc? I'm concerned with the current solution in this way: the user has to retype dozens of the existing reports in her .vimrc. Maybe there should be an option to extend the list of reports, not overwrite? As to the init process, you still need to call task next before anything is shown.

kartynnik avatar Dec 28 '14 21:12 kartynnik

Currently, it is not overwrite already, you don't have to put 'next, long, all, ....' in your g:task_report_command, just your personal reports. But you need to put that line before Bundle 'xxx/vim-taskwarrior' if you use vundle or sth like that, while neobundle will allow you to put it anywhere.

As for the init process, I mean the init process of vim instance, not the TW buffer. Generally speaking, plugin/*.vim files will be sourced each time vim starts.

blindFS avatar Jan 02 '15 02:01 blindFS