The need of editor.LexerName

3 views
Skip to first unread message

Leledumbo

unread,
Oct 25, 2009, 10:56:30 PM10/25/09
to scite-interest
When referencing some properties from lua, we can use:

property.<file filter like *.pas> OR
property.$(file.patterns.<lexer name>)

The problem is that the 2nd form requires lexer name which is not
available. An example scenario is when we want to open abbreviation
file, let's say I have these two lines in my SciTEGlobal.properties:

abbreviations.*.lua=$(SciteDefaultHome)\abbreviations\lua.abbrev
abbreviations.$(file.patterns.pascal)=$(SciteDefaultHome)\abbreviations
\pascal.abbrev

The first one can be referenced by:

props['abbreviations.*.'..props['FileExt']]

But not the 2nd one because it includes more than one extension (i.e:
*.dpr;*.lpr;*.lrs;*.inc;*.pas;*.pp;*.p)

if only editor.LexerName exists, I can use:

props['abbreviations.'..props['file.patterns.'..[props
[editor.LexerName]]]]

So, would you mind providing the property?

Neil Hodgson

unread,
Oct 26, 2009, 8:08:58 PM10/26/09
to scite-i...@googlegroups.com
Leledumbo:

> if only editor.LexerName exists, I can use:

Added in GetLexerLanguage to CVS. The syntax is
name, length = editor:GetLexerLanguage()

Neil

Reply all
Reply to author
Forward
0 new messages