Discussion:
Camel Case Code
Gary Beene
2014-02-08 19:07:11 UTC
Permalink
I though I'd seen this discussed a few years back, couldn't find any
related posts - regarding Camel case code styling.

I'd like to have these 4 code style options:
1. As Typed - whatever the user wants ListVIEW
2. Camel - matches case of keyword in keyword text file ListView
3. Upper - LISTVIEW
4. Lower - listview

The only way I can get Camel to work is to actually replace the text in the
document during lexing. I first halt undo recording, then start it again to
avoid raising the dirty document flag. But that approach means I can never
return to As Typed for pre-existing content.

Is there a way to do what I want?

Regards,
Gary
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2014-02-09 21:58:14 UTC
Permalink
The only way I can get Camel to work is to actually replace the text in the document during lexing.
The document should be treated as read-only in the lexer. Lexing is designed around reading the document and writing styles and folding data.
I first halt undo recording, then start it again to avoid raising the dirty document flag. But that approach means I can never return to As Typed for pre-existing content.
This is fighting against Scintilla so is unlikely to work well.
Is there a way to do what I want?
It would be difficult and you will have to modify the Scintilla source code. Search for caseUpper.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...