#3706 electricKeys should not be defined for PHP

closed-fixed
nobody
None
5
2012-06-08
2012-06-07
No

I don't really see what electricKeys does. I think it is supposed to unindent a label when you hit a colon; but instead, it indents the line. That being said, when I edit a PHP page, I am more often editing HTML than PHP. When I am typing text in a <p> tag, and I hit a colon, my line gets indented for no apparent reason. I have no idea how this might be useful in PHP portions of the file, but in the HTML portions, this is simply annoying, and not what I need 99.9% of the time. I think it would be a less jarring user experience to simply not define:

<PROPERTY NAME="electricKeys" VALUE=":" />

in the php.xml file in the modes folder. Perhaps someone might point the direction to how this is doing what it should and how it is helpful for PHP code. In this case, it would be helpful to detect if we were in a <? ... ?> section or not; and turn it off when not in this section. Otherwise, you could do what I do, and simply delete this line from php.xml.

Not meaning to be dour: TIA, and thx for all the work u guys do making this a great editor :}

Discussion

  • But it also indent the case in switch / case syntax.
    In fact your problem is similar to the problem that was reported about compiler directives in C++ the
    #ifdef SOMETHING
    that are indented instead of being in the beginning of the line.
    We need to enhance jEdit to support no indentation for some tokens.

     
  • Please test jedit daily build, because I think you will no longer suffer from electric keys on jedit, 5 which is to be released really soon. I'm closing the report now, but feel free to reopen it, or just comment, if you meet the same problem on jedit 5. Then please attach a short file that allows for reproducing the problem.

     
    • status: open --> closed-fixed