Re: Syntax Highlighting Editor
- Posted by Don Phillips <Graebel at hotmail.com> Jun 04, 2002
- 434 views
>On the other hand, I've seen your Editor, and it's quite nice. > >EE is basically a combination of the DOS editor and the QBasic editor, >customized for Euphoria. I've also written the feature-incomplete editor >that's currently in the IDE. It does have two features I'd love to see in >your editor: > >1. Autocompletion of code blocks. So if you type the start of a code block, >like "while", it automatically generates the "end while", like this: > >Type "while" and press the spacebar: > > while _ > >the "do" and "end while" are automatically filled in: > > while _ do > end while > >type the test "flag" and press enter: > > while flag _ do My copy already does this =) Works just fine for (for/while/if) statements. >and instead of breaking the line in half, you are placed on the next line, >indented into the block: > > while flag do > _ > end while > Well I did not think of that. Not a half bad idea though. My copy does do auto-indent now, but I never thought about hitting a ret in the middle of the auto-complete. Shouldnt be all that hard to code into it though. >Robert's ED has a similar feature. It's (to my mind) a "must have" feature, >because once you get used to it, you won't want to go back. (nods in agreement) >2. Context-sensitive help. A popup appears to show you the arguments a >routine expects. This isn't as critical, but it's quite nice. So if you >type: > > if open(_ > >then a "hint" appears above or below the current line (depending on the >amount of space available) with something like this: > > open( FILENAME, mode ) > >and when you get to the second arg: > > if open( "myfile", > >that one is highlit: > > open( filename, MODE ) > >not really essential, but nice and helpful. People used to the MS code >editors will love you for it. > >-- David Cuny Yeah, I was saving that for version three. Which I have already started on btw. I am attempting to "reverse engineer" the RichEdit control. My Syntax2 control used RichEdit, but I coded it for Version 2 (unknowingly) which left out the version one users. My Syntax3 control is based on Version 1 since Ver2 & 3 both have Ver1 emulators. It will be able to handle text size based on which version you have. The better the bigger :P I am reverting back (or attempting to) because no matter how I code it in Euphoria, the standard windows controls will always be faster. Also its quite nice *not* to have to worry about cursors, scroll bars, selections, fonts, etc. And not only will it be faster, it will be hugely smaller (or not I guess depending on how much extra features I can pack into it).