[Sublime Text] Wrap multiple lines in tag
How to turn:
apple
orange
strawberry
pineapple
into
<li>apple</li>
<li>orange</li>
<li>strawberry</li>
<li>pineapple</li>
- Select the lines of interst
command + shift + L
control + shift + W
- Type your tag
Written by Chang Huang
Related protips
2 Responses

Really awesome. Didn't know about this so far. Really handy!
over 1 year ago
·

Glad it helps! The problem with this approach is when your code is indented. If you select and drag the whole line for step 1, step 3 will add the tags at the beginning of each line (leaving an empty space after the new tag).
A better solution for this will be:
- Select the line of interest while holding down
option
control + shift + W
- Type your tag
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sublimetext
Authors
Related Tags
#sublimetext
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#