Expand Abbreviation showing red rectangle and needs to confirm by pressing Tab/Enter second time (CSS, JS)

Hi,

I have this problem in PHPStorm. I use Zen coding and in some cases expanding abbreviations shows me red rectangle. I can write into this rectangle, but if I want to hit Enter or Tab, first action is disable this rectangle and then Enter or Tab work normally.
For ex. ([] - shows red rectangle)
1. Write "bd", hit tab.
2. I have "border: []". Write something so I have "border: [1px solid #ddd];|"
3. I want to go to the end of line and go next line, so I hit Enter.
4. First action is hide red rectangle, so caret still is in the same line. I must hit Enter once again to go to next line. For Tab key is the same, first hit does not do anything, only hide red rectangle.

This is not only for zen coding, but also for my own Live Templates (for ex. "log" -> "console.log($VAR0$);")

What to do, to solve this problem with double hitting Enter/Tab ?

Regards,
Chris

4 comments
Comment actions Permalink

The "red rectangle" is a placeholder where PhpStorm expects an input. In your example (  "log" -> "console.log($VAR0$);" ) you clearly specified the placeholder -- $VAR0$.

Enter and Tab are the keys to press that tell PhpStorm to move input focus to another placeholder (in case you have more than one, e.g. "console.log($VAR0$, $VAR1$);")

As far as I'm aware there is no option to disable such behavior as IDE needs to know when you finished entering and text for current variable/placeholder.

P.S.
Pressing Esc in single placeholder situations will have the same effect as Enter/Tab.

0
Comment actions Permalink

Yes I know that this is placeholder for input. I know the idea of the placeholders, most editors use them.
But why the placeholder did'n dissapears while I'm in it? It is only getting longer while I'm writing instead of lose focus, because I am already in this placeholder.
This is annoying to hit twice Tab button only for lose focus of placeholder.

If there is no way to set this in the settings, I think this might be improvement for PHPStorm for the future releases.

0
Comment actions Permalink

Feel free to create Feature Request at Issue Tracker: http://youtrack.jetbrains.net/dashboard/WI  IF there is no workaround/already existing setting (I know none).

If it will have high enough number of votes and good description/explanation then it may be implemented soon (bugs always have priority over new features + it will affect whole IDEA platform, not just PhpStorm).

0

Please sign in to leave a comment.