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
ddeletecchangeyadd?
srepresentssurroundingSfor visual mode surroundings- text object (vim editing)
wwordiwin wordawall 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>
Emmet
Emmet is a plugin for many popular text editors which greatly improves HTML & CSS workflow.
Shortcut key: Ctrl + y + ,