Can I wrap text selection in phpstorm tag?

Suppose I have the text:

This is my text!

How beautiful it is!

And I want to wrap each line in p-tag, is there an easier way than going to each line and adding them manually and closing them semi-automatically?

I want them to look like this:

<p>This is my text!</p>

<p>How beautiful it is!</p>

making as little as possible.

+4
source share
1 answer
  • Select your lines
  • Code | Surround With...
    For Windows / Linux: Ctrl+ Alt+ T
    For MacOS: Cmd+ Alt+T
  • Select Emmett
  • Type p*- this will surround each tag<p>

Screenshot of PhpStorm Emmet functionality

NOTE. Blank lines will also be wrapped, so it’s best to delete them beforehand.

/ .


P.S.

IDE "Surround with Emmet" , , , Surround with....

, , Settings/Preferences | Keymap - Other | Surround with Emmet (: , ).

+23

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


All Articles