idanarye / vim-dutyl

Coordinate D tools to work together for you
http://www.vim.org/scripts/script.php?script_id=5003
79 stars 13 forks source link

support for dub 0.9.24 #15

Closed joakim-brannstrom closed 9 years ago

joakim-brannstrom commented 9 years ago

Detecting the new dub.sdl that is replacing dub.json. Corrected substitution pattern for true/false that was removing the comma.

Hello,

I noticed a bug in vim-dutyl substitution. I hope the solution in this pull request is of adequate quality. Be aware that I have only tested this solution with dub-0.9.23 and dub-0.9.24-rc.1.

The example below demonstrates the problem. Notice the missing comma at the end of the line when the pattern below is ran. :,$s/\vtrue\,?[\n\r]/1\r/ Seems to be fixed by grouping the comma and reusing the group in substitution. :,$s/\vtrue(\,?)[\n\r]/1\1\r/

        "active": true,