I made the following modifications: * Case insensitive entry name matching using the ic() function * The string literal pattern now includes end of line characters because http://en.wikipedia.org/wiki/BibTeX#Examples gave me the impression that string literals can span multiple lines
The Lua lexer previously always matched expressions like "io.input" as one identifier. This was a quick and dirty hack to add support for documentation links in the Lua highlighter. I've decided to keep the hack because it can save quite a lot of code however this behavior is now disabled by default and can be enabled with join_identifiers=true (the Lua highlighter of course enables this behavior by default).
I've also changed the highlighter definition to use a table with named fields which makes the definitions more self explanatory and ready for future expansion :-)
The previous implementation applied several text replacement filters one after the other and they could clash and cause all sorts of nastyness. It was also difficult to apply escaping correctly and I hope that this refactoring will make it easier for me to make the code robust instead of fragile.
Thanks to David Manura (@davidm) for the suggestion :-). While separating the code I also implemented autoloading for everything in the lxsh.* name space to make the code a bit more pleasant to read and write.
Lua lexer: * Include vertical tab in white space * Match numbers before operators (.1 is a number) C lexer: * Optionally match trailing newline after CPP directives * Same goes for single line comments (C++ comments) * Match numbers before operators (.1 is a number)
This should really be a separate mode but that's complicated so for now this will have to do :-)