Today I Learned

hashrocket A Hashrocket project

Vim add text surrounding

So you have in vim one line with: Hello World!.

You can add <b> and </b> surrounding Hello by typing on normal mode:

ysiw<b>
# from: Hello World!
#   to: <b>Hello</b> World!

For the whole line:

yss<b>
# from: Hello World!
#   to: <b>Hello World!</b>

You'll need vim-surround plugin

See More #vim TILs
Every developer at Hashrocket is a Vim expert. Check out our development environment, Dotmatrix, and if you are in Chicago, come to the Vim Chicago Meetup hosted at our Chicago office.