源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

源代码快速定位工具-qwandry使用指南

  • 时间:2021-05-06 05:11 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:源代码快速定位工具-qwandry使用指南
GitHub地址:[url=https://github.com/adamsanderson/qwandry]https://github.com/adamsanderson/qwandry[/url] qwandry 能快速定位到我们需要找到 库文件, 项目 的工具。 Ruby中实现快速定位的方法有好多种,我知道的有三个:
cd `bundle show active_record`
通过tag方法(tag 定位更精确,可以定位到方法级别) 或者通过 qwandry 安装
gem install qwandry
使用
qw matrix # opens ruby's matrix class in your editor
qw rails  # will ask you which version of rails you want to open
qw activerec 3.1 # will find the gem activerecord 3.1 and open it
You can also use Qwandry with other common languages:
qw -r python numpy # opens python's numpy library
qw -r perl URI # open perl's URI library
qw -r node express # open express if it is installed for node
指定编辑器打开
EDITOR=subl qw activerecord 3.2.14
如何自定义?
touch ~/.qwandry/init.rb
然后copy如下内容到文件中
register 'projects' do
 add 'your project path'
end

default :ruby, :gem, :projects

解释 register 方法是 将指定的目录打包 add 将目录加入到搜索中 default 是设置默认的搜索范围 实现的基本原理 通过配置 config 将很多目录打包成 Package, 然后将 Package 打包成 Repository(仓库) 初始化一个Launcher(有Editor等) 根据输入的名称找到对应的Repository中的package(实际上是一个目录地址) 执行系统命令: editor(vim) path
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部