Dutyl - a Vim plugin for running D tools

John Colvin via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Sep 29 09:09:03 PDT 2014


On Sunday, 28 September 2014 at 11:51:21 UTC, Idan Arye wrote:
> On Thursday, 25 September 2014 at 15:40:22 UTC, John Colvin 
> wrote:
>> On Thursday, 14 August 2014 at 22:20:52 UTC, Idan Arye wrote:
>>> GitHub repo: https://github.com/idanarye/vim-dutyl
>>> vim.org page: 
>>> http://www.vim.org/scripts/script.php?script_id=5003
>>>
>>> The main problem with my Vim plugin for DCD(placed inside the 
>>> DCD repo) is the need to set the import paths manually. It 
>>> was a manual task that the user had to do: DCD doesn't know 
>>> the import path the current project is using. Vim doesn't 
>>> know either.
>>>
>>> Luckily - DUB knows. So instead of separate Vim plugins for 
>>> different tools, each operating it's own tool alone, I wanted 
>>> to create one plugin that'll operate both DUB and DCD - one 
>>> that can get the list of import modules from DUB and send it 
>>> to DCD. That's how Dutyl was born.
>>>
>>> Currently, Dutyl's only features are using DCD for 
>>> autocompletion and for DDocs, but it has a module system that 
>>> allows it to add other tools, either to get more 
>>> functionality or to get backup for features that some tools 
>>> can't support for specific projects. Like dependency 
>>> injection but with a real usecase: for projects that don't 
>>> use DUB, Dutyl can back up to a manually written list of 
>>> import paths saved in a hidden file in the project's dir.
>>>
>>> I'm open for suggestions for other tools and features to add 
>>> to Dutyl(write them here, or preferably open GitHub issues 
>>> with them)
>>
>> How does dutyl know where to look for dub.json? It doesn't 
>> seem to find it on my system.
>
> It looks for a file named "dub.json" in the current folder. If 
> it can not find it, it looks for "package.json".

Ah, ok. Is it feasible to have it check up the directory tree as 
well, like git does? I often find myself in this situation:

myProject
|- dub.json
|- source  <- vim pwd here
    |- app.d

and so Dutyl misses myProject/dub.json


More information about the Digitalmars-d-announce mailing list