vim

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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值