Vim
This notes contains useful tips for using Vim or editing and I use spf13-vim.
- spf13-vim is a distribution of vim plugins and resources for Vim.
- Install spf13-vim:
curl http://j.mp/spf13-vim3 -L -o - | sh
Plugins
Surround
Managing all the ‘”[{}]“’ etc.
- Characters meaning
- operations
d
deletec
changey
add?
s
representssurrounding
S
for visual mode surroundings- text object (vim editing)
w
wordiw
in wordaw
all word, including space(s)
- surroundings
(
left bracket will give a space between it and content)
right won’tb
=)
- operations
- Examples
yss)
surround a line of content with()
ysiw<div>
surround a word like this<div>nice</div>
VS<div>
surround a line with<div></div>