On Mon, Nov 16, 2015 at 7:24 AM, Lex Trotman elextr@gmail.com wrote:
As a general comment, Thomas is right, catching every notify and re-styling all the text is going to be too expensive.
It didn't sound to me like the algorithm styles *all* the text, just nearby text. If your code is in one monolithic block, then yes, it's all the text. But it doesn't seem like a common case. And your code wouldn't consist mostly of assignment statements, would it?
You should detect the char added notify and just do the line that the character is added to, and maybe only when = or end of line is typed? Don't even look at the previous or next lines.
How can you *align* the current line if not by checking previous or next lines? And if it turns out the line you've currently typed does have the longest variable name so far, what's the point of the plug-in if it doesn't go back and fix the previous lines to this one?
John Y.