2005年12月27日星期二

vim使用小技巧

1. 使用/pattern搜索,可以再使用*继续查找整个word
2. % 匹配 {} 和 ()
3. [{ 跳到 { start of the current code block
4. gd 跳到变量的定义
5. * find整个word
6. n next find next
7. . (dot) 重复上一次的change
8. ctrl _ N 自动完成
9 缩进 << >>

首先设置
:set shiftwidth=4
:set cindent

没有评论: