View previous topic :: View next topic |
Author |
Message |
creatio
Joined: 13 Nov 2010 Posts: 5
|
Posted: Sun Jan 30, 2011 12:58 pm Post subject: couple of questions |
|
|
First: Colors in the editor
I usually program with a black background that is tailored with some specific colors, but when programming in a .d file I seem to get a black color for almost everything. I tried changing the colors in the Options window, but I have had no success. I've been getting around this by treating .d files as .cs, but then I lose everything else from Visual D
Second: module.ddoc
Visual D can generate a module.ddoc file from the documentation directory. Which in turn generates this for my specific project:
Code: | MODULES =
$(MODULE jabber.dlang.protocol)
$(MODULE jabber.dlang.xml)
$(MODULE .main) |
The module.ddoc file gets added to the build.bat file. Now the problem that i have is that I can't seem to get access to the MODULES macro from the candydoc.ddoc file or from a custom modified one.
Thank you in advance. Great project btw, |
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Mon Jan 31, 2011 1:18 pm Post subject: Re: couple of questions |
|
|
creatio wrote: | First: Colors in the editor |
What version of Visual Studio do you use? In VS2008, basic editing works for me if you adjust the colors "Comment", "Identifier", "Keyword", "Number", "String" and "Visual D Operator" ("Operator is not available in the VS-Shell, it's a setting specific to some other languages). Please note that there are also some more colors to set up that start with "Visual D".
Rainer |
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Mon Jan 31, 2011 1:26 pm Post subject: Re: couple of questions |
|
|
creatio wrote: | Second: module.ddoc
The module.ddoc file gets added to the build.bat file. Now the problem that i have is that I can't seem to get access to the MODULES macro from the candydoc.ddoc file or from a custom modified one.
|
The idea is to add the candy.ddoc to the project aswell. When both files are specified on the command line to dmd, they can access the macros of the other file, as the standard candy.ddoc does in this line
Code: | ADD_MODULES =<script>$(MODULES)</script>
|
Does this work for you?
See also http://www.dsource.org/projects/visuald/wiki/Tour/ProjectConfig
Rainer |
|
Back to top |
|
|
creatio
Joined: 13 Nov 2010 Posts: 5
|
Posted: Mon Jan 31, 2011 3:57 pm Post subject: Re: couple of questions |
|
|
sagitario wrote: | creatio wrote: | First: Colors in the editor |
What version of Visual Studio do you use? In VS2008, basic editing works for me if you adjust the colors "Comment", "Identifier", "Keyword", "Number", "String" and "Visual D Operator" ("Operator is not available in the VS-Shell, it's a setting specific to some other languages). Please note that there are also some more colors to set up that start with "Visual D".
Rainer |
I'm using visual studio 2010. I tried the suggested color for "Comment" etc. It didn't change anything |
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Tue Feb 01, 2011 2:28 am Post subject: Re: couple of questions |
|
|
creatio wrote: | I'm using visual studio 2010. I tried the suggested color for "Comment" etc. It didn't change anything |
I just tried it in the VS2010 Shell and it worked.
http://www.dsource.org/projects/visuald/browser/wiki/colors.png
(The img tag does not seem to work for me...)
The default and automatic color settings where still black, though... Do these adapt with C++/C#?
Rainer |
|
Back to top |
|
|
creatio
Joined: 13 Nov 2010 Posts: 5
|
Posted: Wed Feb 02, 2011 3:29 pm Post subject: Re: couple of questions |
|
|
sagitario wrote: | creatio wrote: | I'm using visual studio 2010. I tried the suggested color for "Comment" etc. It didn't change anything |
I just tried it in the VS2010 Shell and it worked.
http://www.dsource.org/projects/visuald/browser/wiki/colors.png
(The img tag does not seem to work for me...)
The default and automatic color settings where still black, though... Do these adapt with C++/C#?
Rainer |
Just checked, and yes it does change with C++/C#. The colors for those languages are as they should be. I went through the whole list for the font colors. Not one that might influence it is set to black. |
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Thu Feb 03, 2011 12:46 am Post subject: Re: couple of questions |
|
|
creatio wrote: | Just checked, and yes it does change with C++/C#. The colors for those languages are as they should be. I went through the whole list for the font colors. Not one that might influence it is set to black. |
The black tokens in your screenshot should be colored by the settings for "Text Editor"->"Identifier". If this is set to "Default" or "Automatic", it inherits the setting of "Plain Text".
Do the other colors for keywords, operators, etc. work for you? Also, please try putting some code in a "version(none)" block, it should then use slightly different colors from the "Visual D Disabled..." colors. |
|
Back to top |
|
|
creatio
Joined: 13 Nov 2010 Posts: 5
|
Posted: Fri Feb 04, 2011 1:38 pm Post subject: Re: couple of questions |
|
|
sagitario wrote: | The black tokens in your screen-shot should be colored by the settings for "Text Editor"->"Identifier". If this is set to "Default" or "Automatic", it inherits the setting of "Plain Text". |
This is how the settings for "Identifier" are currently. You can also see how it is in the background. As you are able to see, the 'string' D keyword isn't highlighted. This leads me to believe that the keywords that are being highlighted, are coming from the C/C++/C# environment.
sagitario wrote: | Do the other colors for keywords, operators, etc. work for you? Also, please try putting some code in a "version(none)" block, it should then use slightly different colors from the "Visual D Disabled..." colors. |
This is how it looks like inside the version block. Now also the colors of the main changed, but they kinda change back after writing ';' after a statement. I might add the main also changed after writing '{' and '}'
|
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Fri Feb 04, 2011 4:31 pm Post subject: |
|
|
Did you try to set the color explicitely using "Custom" settings instead of "Default"? That's what worked for me, as the default stayed black. Would using custom color settings be a problem for you? I'm not sure I can influence that behaviour, but I will have a look... |
|
Back to top |
|
|
creatio
Joined: 13 Nov 2010 Posts: 5
|
Posted: Fri Feb 04, 2011 4:52 pm Post subject: |
|
|
sagitario wrote: | Did you try to set the color explicitely using "Custom" settings instead of "Default"? That's what worked for me, as the default stayed black. Would using custom color settings be a problem for you? I'm not sure I can influence that behaviour, but I will have a look... |
I set it to 'automatic' and it's started working now...I stupidly forgot to test that in my last post. Thanks!!! Especially with the quick reply's.
Edit: ddoc is also working now.,, |
|
Back to top |
|
|
kfo
Joined: 09 Apr 2011 Posts: 8
|
Posted: Sat Apr 09, 2011 6:49 pm Post subject: |
|
|
I am having a similar problem where all number literals are showing up as black. The 'Literal' color appears to have no effect on the color. Any ideas?
Version 0.3.23
VS 2010 |
|
Back to top |
|
|
sagitario
Joined: 03 Mar 2007 Posts: 292
|
Posted: Sun Apr 10, 2011 2:27 am Post subject: |
|
|
The color used for numbers is called 'Number'
If you have troubles with the 'Default' and 'Automatic' color setting, try setting the color explicitely. |
|
Back to top |
|
|
kfo
Joined: 09 Apr 2011 Posts: 8
|
Posted: Sun Apr 10, 2011 6:17 pm Post subject: |
|
|
Setting 'Number' to a custom color fixed it. Thank you :) |
|
Back to top |
|
|
|