- Select your lines
Code | Surround With...
For Windows/Linux: Ctrl + Alt + T
For MacOS: Cmd + Alt + T- Choose “Emmet”
- Type
p*
— this will surround each line with<p>
tag
NOTE: Empty lines will be wrapped as well so it is better remove them in advance.
Similar/related case.
P.S.
In current versions of IDE the dedicated “Surround with Emmet” action is available which allows you to bring that popup window in one key stroke instead of having going trough via intermediate Surround with...
popup menu first.
That action has no shortcut defined by default, but you can easily change that and assign any desired shortcut in Settings/Preferences | Keymap
— just look for Other | Surround with Emmet
action (hint: use search box to speed up your search).