Textmate toggle collapse / expand CSS rule command?

Does anyone know a team (not a macro) for Textmate / E Text Editor / Redcar / etc. line CSS to one line OR , if the rule is already on one line, expand it to multi-line? I already know about code folding, and this is not what I need - I need to be able to switch between single-line and multi-line modes and edit and save them that way.

For example, if I have this:

h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}

I would like to place the cursor anywhere in the rule, press a key combination, and it will turn into this:

h1 {
  font-size:3em;
  line-height:1;
  margin-bottom:0.5em;
}

If you click the shortcut again, it will be converted back to one line.

Is there anything similar? Does anyone have code that does something like this, could I repurpose (ideally Ruby)? Does anyone know if this is possible in Textmate?

Update : it seems that the CSS folding and extension rule is implemented as a pair of macros in Textmate. However, this does not switch, and it also does not work in the E Text Editor (which does not support macros). Not sure if he works at Redcar. Is it possible to implement something like a command that can switch?

+3
source share
3 answers

In the end, I created my own team for this. Grab it here .

, ; /. , , .

- , , .

+2

CSS ctrl + opt + Q 1 .

+1

Mark Story, ctrl + Q , CSS CSS.

+1

Source: https://habr.com/ru/post/1719715/


All Articles