On Thu, 01 Feb 2007 11:50:03 +0100, Harold Aling h.aling@home.nl wrote:
Dear list,
I'm probably one of many who uses multiple languages for multiple purposes and often forget to add a semicolon (;) at the end of a line in languages which require it (perl, php, etc).
Can geany provide some sort of visual feedback of lines which aren't terminated correctly (just like unclosed quotes)? Or maybe even add the missing semicolon upon 'save'?
Unterminated strings are supported for several filetypes like C, Python, Lua and some others. For example, the string in the printf command in the following C code is highlighted with a different background colour in Geany: int main(int argc, char** argv) { printf("this is an unclosed quoted string "); return 0; } Unfortunately, this doesn't work for PHP and Perl. But this is more a Scintilla issue, so feel free to submit a feature request to the Scintilla tracker[1].
Adding missing semicolon: No. It's surely possible but I don't want to add something like this because it is heavily dependent on the current filetype and would take much efforts to implement. Furthermore it would probably slow down Geany. Remember, Geany != Eclipse ;-).
[1] http://sourceforge.net/tracker/?group_id=2439&atid=352439
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key