www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Sublime Text 3 Gets Better D Support

reply Jack Stouffer <jack jackstouffer.com> writes:
Sublime Text is a very popular text editor, and for a while now 
it's had marginal D support. What has changed recently is updated 
syntax highlighting to support all the new keywords that have 
come in the last couple of years and UDAs 
https://github.com/sublimehq/Packages/commit/b9026cf6ab8ccd05e3704d21b2d5d5cc21450aca.

Syntax highlighting was mostly based on D1 before, but now it 
supports every thing to pure and nothrow to correctly 
highlighting number literals with underscores.

In order to use this, you can either wait until a version of 
sublime is released with these changes, or you can download the 
dev version here https://www.sublimetext.com/3dev, and then 
install the new packages as described here 
https://github.com/sublimehq/Packages#installation.
Jan 27 2016
next sibling parent reply Damian <damianday hotmail.co.uk> writes:
On Wednesday, 27 January 2016 at 17:34:35 UTC, Jack Stouffer 
wrote:
 Sublime Text is a very popular text editor, and for a while now 
 it's had marginal D support. What has changed recently is 
 updated syntax highlighting to support all the new keywords 
 that have come in the last couple of years and UDAs 
 https://github.com/sublimehq/Packages/commit/b9026cf6ab8ccd05e3704d21b2d5d5cc21450aca.

 Syntax highlighting was mostly based on D1 before, but now it 
 supports every thing to pure and nothrow to correctly 
 highlighting number literals with underscores.

 In order to use this, you can either wait until a version of 
 sublime is released with these changes, or you can download the 
 dev version here https://www.sublimetext.com/3dev, and then 
 install the new packages as described here 
 https://github.com/sublimehq/Packages#installation.
Thank you, this is very much welcome! Wishlist: Will we see some dub support integration for building? I find when using rust the cargo build support is excellent, I wish we had this for D in sublime :)
Jan 27 2016
next sibling parent reply Jack Stouffer <jack jackstouffer.com> writes:
On Wednesday, 27 January 2016 at 19:15:02 UTC, Damian wrote:
 Thank you, this is very much welcome!

 Wishlist:
 Will we see some dub support integration for building? I find 
 when using rust the cargo build support is excellent, I wish we 
 had this for D in sublime :)
I actually didn't do this, I just complained on their issue tracker :) I use dub with sublime currently by using sublime's custom build system. Just go to "Build System" under tools, click new build system, and add in the following { "cmd": ["dmd", "-g", "-debug", "$file"], "file_regex": "^(.*?)\\(([0-9]+),?([0-9]+)?\\): (.*)", "selector": "source.d", "path": "/usr/bin:/usr/local/bin", "variants": [ { "name": "Run", "cmd": ["rdmd", "-g", "-debug", "$file"] }, { "name": "unittest", "cmd": ["rdmd", "-g", "-debug", "-unittest", "$file"] }, { "name": "dub", "working_dir": "$project_path", "cmd": ["dub"] } ] } Now in your D project, select the build system you just created, click shift command B, choose dub, and then command B, and now your building with dub.
Jan 27 2016
next sibling parent Pradeep Gowda <pradeep btbytes.com> writes:
On Wednesday, 27 January 2016 at 19:27:47 UTC, Jack Stouffer 
wrote:
 On Wednesday, 27 January 2016 at 19:15:02 UTC, Damian wrote:
 Thank you, this is very much welcome!
 Now in your D project, select the build system you just 
 created, click shift command B, choose dub, and then command B, 
 and now your building with dub.
I've updated my blog post on ST3+D to reflect your build system tips. https://www.btbytes.com/posts/st3d.html#buildingprojects Thanks!
Jan 27 2016
prev sibling parent Twenty Two <sdffgfsd sgsd.com> writes:
On Wednesday, 27 January 2016 at 19:27:47 UTC, Jack Stouffer 
wrote:
 On Wednesday, 27 January 2016 at 19:15:02 UTC, Damian wrote:
 Thank you, this is very much welcome!

 Wishlist:
 Will we see some dub support integration for building? I find 
 when using rust the cargo build support is excellent, I wish 
 we had this for D in sublime :)
I actually didn't do this, I just complained on their issue tracker :) I use dub with sublime currently by using sublime's custom build system. Just go to "Build System" under tools, click new build system, and add in the following { "cmd": ["dmd", "-g", "-debug", "$file"], "file_regex": "^(.*?)\\(([0-9]+),?([0-9]+)?\\): (.*)", "selector": "source.d", "path": "/usr/bin:/usr/local/bin", "variants": [ { "name": "Run", "cmd": ["rdmd", "-g", "-debug", "$file"] }, { "name": "unittest", "cmd": ["rdmd", "-g", "-debug", "-unittest", "$file"] }, { "name": "dub", "working_dir": "$project_path", "cmd": ["dub"] } ] } Now in your D project, select the build system you just created, click shift command B, choose dub, and then command B, and now your building with dub.
Is there any way to get that to build in a terminal window rather than Sublime's inbuilt build window?
Jan 27 2016
prev sibling parent Tofu Ninja <emmons0 purdue.edu> writes:
On Wednesday, 27 January 2016 at 19:15:02 UTC, Damian wrote:
 Thank you, this is very much welcome!

 Wishlist:
 Will we see some dub support integration for building? I find 
 when using rust the cargo build support is excellent, I wish we 
 had this for D in sublime :)
I think the sublime D-Kit plugin has dub building support. Also thanks Jack, I have been using sublime for D for a while now, its great but the highlighting kind sucks. My hope is sometime in the future dcd will have support for semantic highlighting along with the great auto complete it already provides.
Jan 27 2016
prev sibling next sibling parent Johan Engelen <j j.nl> writes:
On Wednesday, 27 January 2016 at 17:34:35 UTC, Jack Stouffer 
wrote:
 Sublime Text is a very popular text editor, and for a while now 
 it's had marginal D support. What has changed recently is 
 updated syntax highlighting to support all the new keywords 
 that have come in the last couple of years and UDAs
Great news! Recently, I worked a little on adding rudimentary dfmt support (like clang-format) to Sublime: https://github.com/Hackerpilot/dfmt/pull/202
Jan 28 2016
prev sibling next sibling parent Jack Stouffer <jack jackstouffer.com> writes:
On Wednesday, 27 January 2016 at 17:34:35 UTC, Jack Stouffer 
wrote:
 In order to use this, you can either wait until a version of 
 sublime is released with these changes, or you can download the 
 dev version here https://www.sublimetext.com/3dev, and then 
 install the new packages as described here 
 https://github.com/sublimehq/Packages#installation.
Build 3098 (3099 is the latest) now contains these changes. So all you have to do is download the dev build of Sublime.
Jan 29 2016
prev sibling next sibling parent sigod <sigod.mail gmail.com> writes:
This package might be of some help to those who doesn't want to 
use dev version:

https://packagecontrol.io/packages/D%20Programming%20Language
Jan 31 2016
prev sibling parent reply Brian Schott <briancschott gmail.com> writes:
On Wednesday, 27 January 2016 at 17:34:35 UTC, Jack Stouffer 
wrote:
 Sublime Text is a very popular text editor, and for a while now 
 it's had marginal D support. What has changed recently is 
 updated syntax highlighting to support all the new keywords 
 that have come in the last couple of years and UDAs 
 https://github.com/sublimehq/Packages/commit/b9026cf6ab8ccd05e3704d21b2d5d5cc21450aca.

 Syntax highlighting was mostly based on D1 before, but now it 
 supports every thing to pure and nothrow to correctly 
 highlighting number literals with underscores.

 In order to use this, you can either wait until a version of 
 sublime is released with these changes, or you can download the 
 dev version here https://www.sublimetext.com/3dev, and then 
 install the new packages as described here 
 https://github.com/sublimehq/Packages#installation.
Bumping this thread because these new features are no longer in beta: build 3103 is out. https://www.sublimetext.com/3
Feb 09 2016
next sibling parent TheGag96 <thegag96 gmail.com> writes:
Just got the new update, and when I reloaded my files, any source 
code inside a class has every variable name and all punctuation 
colored according to my theme: http://i.imgur.com/RxqTqoP.png

If I'm remembering right Java files look like the right half of 
the image as well, though I'm not sure what parameter in my theme 
I'm supposed to change to make this go back to what it was 
before, though... As it is it's a little eye-searing. Is this 
just a result of Sublime parsing D better now?
Feb 09 2016
prev sibling parent reply sigod <sigod.mail gmail.com> writes:
On Tuesday, 9 February 2016 at 21:08:37 UTC, Brian Schott wrote:
 On Wednesday, 27 January 2016 at 17:34:35 UTC, Jack Stouffer 
 wrote:
 Sublime Text is a very popular text editor, and for a while 
 now it's had marginal D support. What has changed recently is 
 updated syntax highlighting to support all the new keywords 
 that have come in the last couple of years and UDAs 
 https://github.com/sublimehq/Packages/commit/b9026cf6ab8ccd05e3704d21b2d5d5cc21450aca.

 Syntax highlighting was mostly based on D1 before, but now it 
 supports every thing to pure and nothrow to correctly 
 highlighting number literals with underscores.

 In order to use this, you can either wait until a version of 
 sublime is released with these changes, or you can download 
 the dev version here https://www.sublimetext.com/3dev, and 
 then install the new packages as described here 
 https://github.com/sublimehq/Packages#installation.
Bumping this thread because these new features are no longer in beta: build 3103 is out. https://www.sublimetext.com/3
New syntax highlighting is not as good as I expected it to be. Function definition still is not highlighted properly if line contains `;` in it. And now same happens with `.` and `*`. Highlights `inout` as function name. Doesn't highlight `assert` anymore. Etc... :/
Feb 10 2016
parent jmh530 <john.michael.hall gmail.com> writes:
On Wednesday, 10 February 2016 at 18:00:42 UTC, sigod wrote:
 New syntax highlighting is not as good as I expected it to be.
I was surprised by how good it looks. I just don't have any interest in using Sublime.
Feb 10 2016