On Tue, 06 May 2014 20:28:13 GMT, Andrej Mitrovic wrote:
I have this situation where I want my editor to run
dub
to build the file I have currently opened (I'm using Scite as an example).Typically, all I need is a
SciTEDirectory.properties
file in either the current or some parent directory with these contents:command.go.subsystem.*.d=0 command.go.*.d=rdmd $(FilePath)
But if I want to use
dub
things won't be that easy. I can tell where exactly thedub.json
file is located, so I could attempt to place my editor script next to it and write this inSciTEDirectory.properties
:command.go.subsystem.*.d=0 # SciteDirectoryHome => Directory path of SciTEDirectory.properties command.go.*.d=dub $(SciteDirectoryHome)\dub.json --config=$(FileName)
That would have worked perfectly, but it doesn't because the working directory of the editor doesn't match the directory of the
dub.json
file. I can't make the editor change its current working directory.(...)
There is the possibility to do dub --root=$(SciteDirectoryHome)
, which should do the right thing here. The only thing notable is that for pre-0.9.20 versions, the resulting executable will always execute in it's own package directory as the CWD, while 0.9.20 will let it execute in the editor's CWD, if no explicit "workingDirectory"
is specified in its dub.json.