Emerald Editor Discussion
October 19, 2017, 04:41:30 am *
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: Automatic indentation  (Read 6235 times)
0 Members and 1 Guest are viewing this topic.
John Yeung
Senior Miner
***
Posts: 85


« on: December 21, 2006, 06:42:56 am »

I know not everyone is as passionate about this as I am, but lack of fairly smart autoindentation (so that you could write a well-indented program without typing the tabs or leading spaces yourself) is a dealbreaker for me.  It doesn't have to be perfectly robust, but it should get the indentation right enough of the time and use obvious enough rules that it can be forgiven if it gets it wrong.

I think Crimson's autoindentation is adequate for C/C++/Java and Python, though it could be better.  For some other languages, like Pascal and Ruby, it is nonexistent, because it cannot handle keywords as block delimiters.  This is a major, major weakness of Crimson and should not be duplicated in Emerald Editor!

Another thing to watch out for is SciTE's autoindentation.  I bring it up because EE is apparently using Scintilla.  I don't know how much of the problem is due to SciTE and how much to Scintilla, but my main issue with SciTE's indentation is that it allows the indentation signals to appear anywhere on a line, while I feel that they should occur only at the beginning or end of a line (after ignoring whitespace and comments).

I don't want to ramble on too long (which I may have done already), so I'll end here.  I'll be happy to go into more detail if there is interest in further discussion.

John
Logged
Matthew1344
Gem Cutter
****
Posts: 103


« Reply #1 on: December 21, 2006, 03:38:11 pm »

I agree, particularly about the indentation, but the root problem is what you said about how it "cannot handle keywords as block delimiters".  This will also cause problems when we try to implement code-folding (which CE doesn't do).

EE's syntax handling needs to be much more flexible regarding dilimeters.  There has been a good deal of talk here in the forums about syntax file format.  I'm sure this will be addressed.
Logged
John Yeung
Senior Miner
***
Posts: 85


« Reply #2 on: December 22, 2006, 02:58:22 am »

I've now taken a look at the source code for SciTE, and while I'm not a C++ programmer, it looks to me like the indentation problem it has is definitely within SciTE, and not within Scintilla.

This bodes well for EE.  I think Scintilla is a good choice for the base editor component, and I am confident there will be no problem using keywords to signal code blocks for folding and indentation.  (SciTE seems to have decent folding, and could have proper autoindentation if relatively minor adjustments were made.)

John
Logged
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.078 seconds with 19 queries.