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

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

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

  2021-03-19 我要评论
想了解源代码快速定位工具-qwandry使用指南的相关内容吗,在本文为您仔细讲解源代码快速定位工具的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:qwandry,下面大家一起来学习吧。

GitHub地址:https://github.com/adamsanderson/qwandry

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

猜您喜欢

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们