Suppose I have a text:
This is my text!
How beautiful it is!
And I want to wrap each line within a p
-tag, is there an easier way than to navigate to each line and add them manually and have them close semi-automatically?
I want them to look like this:
<p>This is my text!</p>
<p>How beautiful it is!</p>
while having to do as less as possible.
Code | Surround With...
p*
-- this will surround each line with <p>
tagNOTE: Empty lines will be wrapped as well so it is better remove them in advance.
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).