D + Dub + Sublime +... build/run in terminal?
SuperLuigi via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Sep 13 03:00:12 PDT 2015
Just wondering if anyone here might know how I can accomplish
this... basically I'm editing my D code in Sublime using the Dkit
plugin to access DCD which so far is more reliable than
monodevelop's autocomplete but I do need to reset the server
pretty often... but that's neither here nor there...
Sublime is great but its little output panel sucks... won't
update stdout text until the end of program run so I'd like to
open newly built programs in a linux terminal. So I installed a
terminal plugin https://github.com/wbond/sublime_terminal . I can
open the terminal, great. I can build with dub, great. Now I need
to put them together... somehow...
When building, sublime looks at a file it has called
D.sublime-build, and this files looks like the following:
{
"cmd": ["dmd", "-g", "-debug", "$file"],
"file_regex": "^(.*?)\\(([0-9]+),?([0-9]+)?\\): (.*)",
"selector": "source.d",
"variants":
[
{
"name": "Run",
"cmd": ["rdmd", "-g", "-debug", "$file"]
},
{
"name": "dub",
"working_dir": "$project_path",
"cmd": ["dub"]
}
]
}
I'm pretty sure I need to edit the last line to pop open the
terminal at the project path and run dub... but whatever I put in
messes up and I just get errors...
Has anyone done this before and can give me a clue as to what I
can do to get this to work?
More information about the Digitalmars-d-learn
mailing list