4、Vim常用命令
<a>#打开类似于textmate的查找文件功能,支持目录限制符/
ctrl + t
#历史文件列表
ctrl + b
#刷新查找时显示的候选文件
\r
#打开浏览器查看Rails帮助
shift + RR
#打开浏览器查看Ruby帮助
shift + RB
<b>#大小写转换
#选中要转换的字符
(1)vw
#转换为大写字母
(1-1)shift + u
#转换为小写字母
(1-2)u
<c>#字符串前后增加双引号
ysiw"
#字符串前后双引号改为单引号
cs"'
#去掉字符串前后单引号
ds'
<5>快捷方式
ct + ( —— 删除文字到(为止
在(处执行 shift + % —— 匹配对应的)
批量修改(ctrl + v, shift+i, 要改的内容, esc)/批量删除(ctrl + v, x)
dw (删除一个单词)
yw(复制一个单词)
[p(上下行换位置)
另外會發現增加了多個rake tasks,可以用來個測試Example檔。
$ rake -T spec rake spec # Run all specs in spec directory (exclud... rake spec:clobber_rcov # Remove rcov products for rcov rake spec:controllers # Run the specs under spec/controllers rake spec:db:fixtures:load # Load fixtures (from spec/fixtures) into... rake spec:doc # Print Specdoc for all specs (excluding ... rake spec:helpers # Run the specs under spec/helpers rake spec:lib # Run the specs under spec/lib rake spec:models # Run the specs under spec/models rake spec:plugin_doc # Print Specdoc for all plugin specs rake spec:plugins # Run the specs under vendor/plugins (exc... rake spec:plugins:rspec_on_rails # Runs the examples for rspec_on_rails rake spec:rcov # Run all specs in spec directory with RC... rake spec:server:restart # reload spec_server. rake spec:server:start # start spec_server. rake spec:server:stop # stop spec_server. rake spec:views # Run the specs under spec/views