From: <dmo...@gm...> - 2001-07-23 20:27:37
|
Hello Slava, On Sunday, July 22, 2001, 3:58:48 AM, you wrote: > On Sat, Jul 21, 2001 at 10:57:22PM +0200, Dirk M=F6bius wrote: >> Would it help to have the block regexps match only the text of the >> current line=3F I'm not sure I understand your idea completely... > What I meant was that you could have something like this: > blockStart=3D"\<begin\>" > blockEnd=3D"\<end\>" > in Pascal mode, for example. However, to unindent the line as soon as > 'end' is typed, you would need to match the current line against the > blockEnd regexp with every character typed; which is very inefficent. ... and I wouldn't use such a feature, because I would find it annoying that the "end" word jumps around. Maybe we could steal ideas from Emacs (20 yrs of development should somehow evolve the best solution...): Let there be some set of electric chars; if you hit one of them, the current line is indented. For Java (and Pascal), this would be "}", ";" and "<Return>". For Python, this would be just "<Return>". Add the ability to configure the "electricity" of each of the chars. Because I wouldn't want <Return> to be electric in all of my modes. Dirk. |