www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D syntax highlighting in jEdit

reply Clint Olson <Nobody Nowhere.com> writes:
jEdit 4.2 was recently released (www.jedit.org) with built in D syntax 
highlighting.
Sep 01 2004
next sibling parent reply "Walter" <newshound digitalmars.com> writes:
"Clint Olson" <Nobody Nowhere.com> wrote in message
news:ch52ld$2fh1$1 digitaldaemon.com...
 jEdit 4.2 was recently released (www.jedit.org) with built in D syntax
 highlighting.
Thanks! On your page http://www.jedit.org/index.php?page=features, can you replace the letter "D" with <a href="http://www.digitalmars.com/d/" title="The D Programming Language">D</a> ?
Sep 01 2004
parent reply Clint Olson <Nobody Nowhere.com> writes:
Walter wrote:

 "Clint Olson" <Nobody Nowhere.com> wrote in message
 news:ch52ld$2fh1$1 digitaldaemon.com...
 
jEdit 4.2 was recently released (www.jedit.org) with built in D syntax
highlighting.
Thanks! On your page http://www.jedit.org/index.php?page=features, can you replace the letter "D" with <a href="http://www.digitalmars.com/d/" title="The D Programming Language">D</a> ?
Sorry, not my page, I'm just a happy user. But I can pass along the request.
Sep 01 2004
parent "Walter" <newshound digitalmars.com> writes:
"Clint Olson" <Nobody Nowhere.com> wrote in message
news:ch567l$2h9m$1 digitaldaemon.com...
 Sorry, not my page, I'm just a happy user.

 But I can pass along the request.
Thanks!
Sep 01 2004
prev sibling parent reply Jim Lawton <NOSPAMjim.lawtonNOSPAM gmail.com> writes:
All it does so far is syntax highlighting. It also delegates
to the Doxygen mode if you embed Doxygen comments in your code
(which I do), like the C and C++ modes also do now.

It hasn't gotten a huge amount of testing, but if anyone finds any
bugs or has any ideas for improving it, please let me know.


On 09/01/2004 06:59 PM, Clint Olson wrote:
 jEdit 4.2 was recently released (www.jedit.org) with built in D syntax
 highlighting.
/regards/jim
Sep 02 2004
next sibling parent reply Kramer <Kramer_member pathlink.com> writes:
When using "r" for Wysiwyg strings, the text after the first Wysiwyg string is
still highlighted as if it were part of the first string, until the next quote.

Example: writefln(r"c:\", r"d:\");
^^^^^^^^^
highlighted

Sorry if this is not the place for this post.  Is there another forum this
should go?

-Kramer


In article <ch6h7l$39f$2 digitaldaemon.com>, Jim Lawton says...
All it does so far is syntax highlighting. It also delegates
to the Doxygen mode if you embed Doxygen comments in your code
(which I do), like the C and C++ modes also do now.

It hasn't gotten a huge amount of testing, but if anyone finds any
bugs or has any ideas for improving it, please let me know.


On 09/01/2004 06:59 PM, Clint Olson wrote:
 jEdit 4.2 was recently released (www.jedit.org) with built in D syntax
 highlighting.
/regards/jim
Sep 02 2004
parent reply Nick <Nick_member pathlink.com> writes:
In article <ch6j4l$4q0$1 digitaldaemon.com>, Kramer says...
When using "r" for Wysiwyg strings, the text after the first Wysiwyg string is
still highlighted as if it were part of the first string, until the next quote.

Example: writefln(r"c:\", r"d:\");
^^^^^^^^^
highlighted
Short answer: writefln(r"c:\\", r"d:\\"); Long answer: The backslash is in many cases considered as a "literal" character, which means that the next character is to be taken literally as part of the string. For example, \" means that the character " is supposed to be part of the string. In your case the resulting string is: c:", r and then the string ends (I guess your example didn't compile?). To use an actual backslash character as part ot the string, use \\ Nick
Sep 02 2004
parent reply Nick <Nick_member pathlink.com> writes:
Or maybe I've just misunderstood what a Wysiwyg string is...

Nick

In article <ch72d8$agf$1 digitaldaemon.com>, Nick says...
In article <ch6j4l$4q0$1 digitaldaemon.com>, Kramer says...
When using "r" for Wysiwyg strings, the text after the first Wysiwyg string is
still highlighted as if it were part of the first string, until the next quote.

Example: writefln(r"c:\", r"d:\");
^^^^^^^^^
highlighted
Short answer: writefln(r"c:\\", r"d:\\"); Long answer: The backslash is in many cases considered as a "literal" character, which means that the next character is to be taken literally as part of the string. For example, \" means that the character " is supposed to be part of the string. In your case the resulting string is: c:", r and then the string ends (I guess your example didn't compile?). To use an actual backslash character as part ot the string, use \\ Nick
Sep 02 2004
next sibling parent Kramer <Kramer_member pathlink.com> writes:
I noticed that putting in the extra backslash fixed the highlighting.  But that
"r" in front of the string says to treat the string exactly as it's typed and
not to interpret any backslashes as escape characters.  So if I do put in the
extra backslash, I'll have two.

I don't know if jEdit can do that type of special case highlighting.

It's not a big thing, just a nicety. :)

-Kramer

In article <ch7309$avm$1 digitaldaemon.com>, Nick says...
Or maybe I've just misunderstood what a Wysiwyg string is...

Nick

In article <ch72d8$agf$1 digitaldaemon.com>, Nick says...
In article <ch6j4l$4q0$1 digitaldaemon.com>, Kramer says...
When using "r" for Wysiwyg strings, the text after the first Wysiwyg string is
still highlighted as if it were part of the first string, until the next quote.

Example: writefln(r"c:\", r"d:\");
^^^^^^^^^
highlighted
Short answer: writefln(r"c:\\", r"d:\\"); Long answer: The backslash is in many cases considered as a "literal" character, which means that the next character is to be taken literally as part of the string. For example, \" means that the character " is supposed to be part of the string. In your case the resulting string is: c:", r and then the string ends (I guess your example didn't compile?). To use an actual backslash character as part ot the string, use \\ Nick
Sep 02 2004
prev sibling parent reply J C Calvarese <jcc7 cox.net> writes:
Nick wrote:
 Or maybe I've just misunderstood what a Wysiwyg string is...
I think that's the case: From http://www.digitalmars.com/d/lex.html#stringliteral: Wysiwyg quoted strings are enclosed by r" and ". All characters between the r" and " are part of the string except for EndOfLine which is regarded as a single \n character. There are no escape sequences inside r" ": r"hello" r"c:\root\foo.exe" r"ab\n" string is 4 characters, 'a', 'b', '\', 'n'
 
 Nick
 
 In article <ch72d8$agf$1 digitaldaemon.com>, Nick says...
 
In article <ch6j4l$4q0$1 digitaldaemon.com>, Kramer says...

When using "r" for Wysiwyg strings, the text after the first Wysiwyg string is
still highlighted as if it were part of the first string, until the next quote.

Example: writefln(r"c:\", r"d:\");
^^^^^^^^^
highlighted
Short answer: writefln(r"c:\\", r"d:\\"); Long answer: The backslash is in many cases considered as a "literal" character, which means that the next character is to be taken literally as part of the string. For example, \" means that the character " is supposed to be part of the string. In your case the resulting string is: c:", r and then the string ends (I guess your example didn't compile?). To use an actual backslash character as part ot the string, use \\ Nick
-- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/
Sep 02 2004
next sibling parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
J C Calvarese wrote:

 Nick wrote:
 
 Or maybe I've just misunderstood what a Wysiwyg string is...
I think that's the case: From http://www.digitalmars.com/d/lex.html#stringliteral: Wysiwyg quoted strings are enclosed by r" and ". All characters between the r" and " are part of the string except for EndOfLine which is regarded as a single \n character. There are no escape sequences inside r" ": r"hello" r"c:\root\foo.exe" r"ab\n" string is 4 characters, 'a', 'b', '\', 'n'
No escape sequences? How would it then be possible to have the string "JCC" (including the ") in there? r"My handle is "JCC"" wouldn't work very well, would it? Lars Ivar Igesund
Sep 03 2004
parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
Lars Ivar Igesund wrote:
<snip>
 No escape sequences?
That's the whole point.
 How would it then be possible to have the string
 "JCC" (including the ") in there?
 r"My handle is "JCC""
 wouldn't work very well, would it?
Use the other notation: `My handle is "JCC"` Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Sep 03 2004
parent J C Calvarese <jcc7 cox.net> writes:
In article <ch9do4$1ed9$1 digitaldaemon.com>, Stewart Gordon says...
Lars Ivar Igesund wrote:
<snip>
 No escape sequences?
That's the whole point.
 How would it then be possible to have the string
 "JCC" (including the ") in there?
 r"My handle is "JCC""
 wouldn't work very well, would it?
Use the other notation: `My handle is "JCC"`
This should work, too: "My handle is \"JCC\"" (Note the absence of the leading "r".)
Stewart.

-- 
My e-mail is valid but not my primary mailbox.  Please keep replies on 
the 'group where everyone may benefit.
jcc7
Sep 03 2004
prev sibling parent reply Jim Lawton <NOSPAMjim.lawtonNOSPAM gmail.com> writes:
OK, I'll try to fix that. Thanks.

You can either post here (although I don't check every day)
or email me directly.

/regards/jim


On 09/03/2004 12:51 AM, J C Calvarese wrote:
 Nick wrote:
 
 Or maybe I've just misunderstood what a Wysiwyg string is...
I think that's the case: From http://www.digitalmars.com/d/lex.html#stringliteral: Wysiwyg quoted strings are enclosed by r" and ". All characters between the r" and " are part of the string except for EndOfLine which is regarded as a single \n character. There are no escape sequences inside r" ": r"hello" r"c:\root\foo.exe" r"ab\n" string is 4 characters, 'a', 'b', '\', 'n'
 Nick

 In article <ch72d8$agf$1 digitaldaemon.com>, Nick says...

 In article <ch6j4l$4q0$1 digitaldaemon.com>, Kramer says...

 When using "r" for Wysiwyg strings, the text after the first Wysiwyg
 string is
 still highlighted as if it were part of the first string, until the
 next quote.

 Example: writefln(r"c:\", r"d:\");
 ^^^^^^^^^
 highlighted
Short answer: writefln(r"c:\\", r"d:\\"); Long answer: The backslash is in many cases considered as a "literal" character, which means that the next character is to be taken literally as part of the string. For example, \" means that the character " is supposed to be part of the string. In your case the resulting string is: c:", r and then the string ends (I guess your example didn't compile?). To use an actual backslash character as part ot the string, use \\ Nick
Sep 06 2004
parent reply Jim Lawton <NOSPAMjim.lawtonNOSPAM gmail.com> writes:
I've fixed the problem with highlighting raw strings, and also added
highlighting of the /+ ... +/ comment form (with the caveat that it
doesn't yet handle nested comments). I'm trying to find out if it
is even possible for Jedit's syntax mode to handle nested comments.

The updated mode has been submitted to the Jedit maintainer, but if
anyone wants it before the next release, just drop me an email.

/regards/jim
Sep 14 2004
parent Jim Lawton <NOSPAMjim.lawtonNOSPAM gmail.com> writes:
Nested /+ ... +/ are also now correctly highlighted. The updated mode
has been submitted to jedit.

Again, if anyone wants it before the next release of JEdit, just drop
me an email.

/jim
Sep 16 2004
prev sibling parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
Jim Lawton wrote:

 All it does so far is syntax highlighting. It also delegates
 to the Doxygen mode if you embed Doxygen comments in your code
 (which I do), like the C and C++ modes also do now.
<snip> Does this mean that it highlights as C, C++ or D according to the extension, but uses the Doxygen mode specifically to highlight the comments? I noticed a typo on the webpage: DOxygen instead of Doxygen. Not to mention Latex instead of LaTeX if that's what's meant.... Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Sep 02 2004
parent Jim Lawton <NOSPAMjim.lawtonNOSPAM gmail.com> writes:
On 09/02/2004 01:51 PM, Stewart Gordon wrote:
 Does this mean that it highlights as C, C++ or D according to the
 extension, but uses the Doxygen mode specifically to highlight the
 comments?
Sort of. In the XML that defines the syntax for each language, there is a definition for a Doxygen comment. If the language mode encounters one of those forms in the source, it delegates all syntax highlighting *inside* the special comment to the Doxygen mode. Normal comments are highlighted by the source language mode, as are all non-comment lines. /regards/jim
Sep 06 2004