Yes, that would work well.  I would want to be able to reindent on both
specific characters as well as arbitrary text, which could both covered by
a regex.


On Tue, Apr 1, 2014 at 12:33 PM, Marijn Haverbeke
<notifications@github.com>wrote:

> In mode/systemverilog/systemverilog.js:
>
> > +      // contextClosing may be mulitple keywords separated by ;
> > +      var closingKeywords = contextClosing.split(";");
> > +      for (var i in closingKeywords) {
> > +        if (text == closingKeywords[i]) {
> > +          return true;
> > +        }
> > +      }
> > +      return false;
> > +    }
> > +  }
> > +
> > +  // Interface
> > +  return {
> > +
> > +    // Characters to force current line to reindent
> > +    electricChars: "{}()[];abcdefghijklmnopqrstuvwxyz",
>
> A possible solution to the electricChars issue would be to allow that
> property to contain a regexp, in which case the reindentation will only
> happen when the line (up to the newly typed text) matches the regexp. Does
> that sound like it'd work for you?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/marijnh/CodeMirror/pull/2412/files#r11168425>
> .
>