On Tue, 16 Dec 2008 04:58:48 +0100 (CET) ioguix@free.fr wrote:
Though this function treats all kinds of strings equally, that is for languages like C or Python where you have different kind of strings ('blah', "blah", ''' blag ''', ...) this function returns TRUE for all kinds. But you probably want something more fine-grained to differentiate between 'blah' and "blah".
Ok. This is a good start anyway. We could at least disabling auto-close quotes inside a string... However, I noticed simple quoted strings and double quoted strings are sometime highlighted with different colors (depending of the current language type, C doesn't, PHP does)...So I guess Scintilla parser has some internal mechanism to handle this.
Yes, the sci_get_style_at() function returns an enum value specific to each lexer.
@nick: If we can do this using a plugin, I think it is do-able...I'm not
It doesn't need to be a plugin, at least not yet. Maybe I shouldn't have mentioned it ;-) It's might be better in the core at first so you can use core-only functions.
really closed to the idea as I thought maybe we could fine tune this kind of feature using some language oriented configuration. Using a language oriented configuration plugin, we could do far more than just auto-closing quotes and brackets (don't ask me what tonight plz :P). I should admit however that I'm not very enclin presently to maintain such a plugin which needs a lot of work to be very interesting...
Regards, Nick