Emerald Editor Discussion
September 19, 2017, 06:05:37 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Set the syntax of "folding" sections  (Read 9055 times)
0 Members and 1 Guest are viewing this topic.
supermkl321
Prospector
*
Posts: 5


« on: July 13, 2007, 05:08:32 am »

Related to the code folding discussion [http://forum.emeraldeditor.com/index.php?topic=199.0] but separate enough to deserve its own topic.  One nice feature when working with one file containing multiple languages (E.G. PHP: primarily HTML, but containing buts of PHP sparsed into it) would be if it was possible to set the syntax highlighting of each "foldable" section could bet set independently, and if it was possible in the Syntax files to define what constitutes a begin/end fold.

how likely/feasible is this?
Logged
rageboy
Jeweller
*****
Posts: 305

Ankit Singla


« Reply #1 on: July 13, 2007, 05:06:40 pm »

You bring up an interesting case. I *think* it might be possible, but I don't know how easy it would be to define syntax to be used in folds within the actual sytax file. I can see how it could be done with select text->right click->set syntax or similar, though.
Logged
supermkl321
Prospector
*
Posts: 5


« Reply #2 on: July 13, 2007, 05:14:22 pm »

I have no problem with right click, but it just seems to me that if we have "folding" begin/end delimiters (not sure if this is the case, I haven't looked through the syntax format) then, when you right click and select menu item "Change Syntax of section" it could just scan backwards to the most recent open fold delimiter and forward to the matching close delimiter and apply the syntax between them

I do also like the select text idea as well, just seems like an extra step that may not be recessary in general.
Logged
rageboy
Jeweller
*****
Posts: 305

Ankit Singla


« Reply #3 on: July 13, 2007, 05:17:24 pm »

Hm. That might work. Seeing as EE doesn't really exist yet, I can't say anything for sure, but at least we have some sort of pseudocode now Smiley
Logged
supermkl321
Prospector
*
Posts: 5


« Reply #4 on: July 13, 2007, 05:39:30 pm »

What stage is EE development in right now?  I'm a CS major, with experience in C and Java, but I've never really worked on a large scale project like this.  This is one that sounds like something I'm interested in helping with.  Where can I start, cause I felt out of my depth when I just looked over the source.  How should I go about starting to contribute?
Logged
rageboy
Jeweller
*****
Posts: 305

Ankit Singla


« Reply #5 on: July 13, 2007, 05:49:58 pm »

Design. What's in the source right now is a rebranded SciTE if I remember correctly. I'm trying to see what's going on with it. The lead design architect and project manager haven't been active for a while.
I am a CompE major also with C/C++/Java experience, so I'm pretty much in the same boat as you. If you've ever done a multi-file project, a larger scale EE/CE project is pretty much exactly that with a heckuva lot more files. I haven't much looked at the EE code, but I've looked into the CE code a bit, and I've done a bit with Pidgin (ex-gaim) in the way of larger projects. Shoot me an IM. I'll see if I can make the code a more comfortable experience for you Smiley
Logged
supermkl321
Prospector
*
Posts: 5


« Reply #6 on: July 13, 2007, 06:04:52 pm »

Thanks for the info.  I've done one what I would consider multi-file project in my CS time.  (working on a SQL Engine)  Other than that most of what I've done has been simple.  Can't hit up IM Right now (I'm at work), but I'll shoot you a message sometime when I'm off.
« Last Edit: July 13, 2007, 09:53:00 pm by supermkl321 » Logged
John Yeung
Senior Miner
***
Posts: 85


« Reply #7 on: July 14, 2007, 02:26:41 am »

What's in the source right now is a rebranded SciTE if I remember correctly.

Not SciTE.  wxStEdit.  Both use Scintilla, but SciTE is a mature, complete, full-featured editor, under active development by the author of Scintilla.  It is utterly usable in its current form, and is in fact my preferred editor.  (That's right:  Crimson is not my primary editor.)

The reason EE was modeled on wxStEdit was because wxStEdit uses wxWidgets, a popular cross-platform GUI library which this forum mostly agreed was a good choice.

John
Logged
John Yeung
Senior Miner
***
Posts: 85


« Reply #8 on: July 14, 2007, 02:37:45 am »

Related to the code folding discussion [http://forum.emeraldeditor.com/index.php?topic=199.0] but separate enough to deserve its own topic.  One nice feature when working with one file containing multiple languages (E.G. PHP: primarily HTML, but containing buts of PHP sparsed into it) would be if it was possible to set the syntax highlighting of each "foldable" section could bet set independently, and if it was possible in the Syntax files to define what constitutes a begin/end fold.

how likely/feasible is this?

It actually already falls under a different topic.  This thread is quite long, but if you are interested in syntax highlighting and folding, it is worth reading: http://forum.emeraldeditor.com/index.php?topic=236.0.  The proposed syntax grammar is kind of extended-BNF-style, and would make it just about trivial to nest different highlighters.

(Szandor should be perking up within a few moments.)

John
Logged
Szandor
Senior Miner
***
Posts: 92



« Reply #9 on: July 19, 2007, 12:55:20 pm »

Related to the code folding discussion [http://forum.emeraldeditor.com/index.php?topic=199.0] but separate enough to deserve its own topic.  One nice feature when working with one file containing multiple languages (E.G. PHP: primarily HTML, but containing buts of PHP sparsed into it) would be if it was possible to set the syntax highlighting of each "foldable" section could bet set independently, and if it was possible in the Syntax files to define what constitutes a begin/end fold.

how likely/feasible is this?

It actually already falls under a different topic.  This thread is quite long, but if you are interested in syntax highlighting and folding, it is worth reading: http://forum.emeraldeditor.com/index.php?topic=236.0.  The proposed syntax grammar is kind of extended-BNF-style, and would make it just about trivial to nest different highlighters.

(Szandor should be perking up within a few moments.)

John


Time to perk... ;-)

The short answer is: Yes, it's possible through the proposed syntax format to link in other syntax files so that you can use them together. As for actual folding, that is a feature for the program but I like the idea.
Logged

"Cleverly disguised as an original signature..."
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.092 seconds with 19 queries.