国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

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

2019-10-26 19:23:32
字體:
供稿:網(wǎng)友

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

qwandry 能快速定位到我們需要找到 庫文件, 項(xiàng)目 的工具。

Ruby中實(shí)現(xiàn)快速定位的方法有好多種,我知道的有三個(gè):

cd `bundle show active_record`

通過tag方法(tag 定位更精確,可以定位到方法級(jí)別)
或者通過 qwandry
安裝


gem install qwandry

使用

qw matrix # opens ruby's matrix class in your editorqw rails  # will ask you which version of rails you want to openqw activerec 3.1 # will find the gem activerecord 3.1 and open itYou can also use Qwandry with other common languages:qw -r python numpy # opens python's numpy libraryqw -r perl URI # open perl's URI libraryqw -r node express # open express if it is installed for node

指定編輯器打開

EDITOR=subl qw activerecord 3.2.14

如何自定義?


touch ~/.qwandry/init.rb

然后copy如下內(nèi)容到文件中

register 'projects' do add 'your project path'enddefault :ruby, :gem, :projects

解釋

register 方法是 將指定的目錄打包

add 將目錄加入到搜索中

default 是設(shè)置默認(rèn)的搜索范圍

實(shí)現(xiàn)的基本原理

通過配置 config 將很多目錄打包成 Package, 然后將 Package 打包成 Repository(倉庫)
初始化一個(gè)Launcher(有Editor等)

根據(jù)輸入的名稱找到對(duì)應(yīng)的Repository中的package(實(shí)際上是一個(gè)目錄地址)

執(zhí)行系統(tǒng)命令: editor(vim) path

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 遂宁市| 凤山县| 五大连池市| 吉首市| 岳阳市| 贡觉县| 英山县| 灵丘县| 邢台市| 开远市| 右玉县| 鲜城| 凤台县| 丰台区| 安宁市| 喀喇沁旗| 北票市| 枝江市| 珠海市| 黄平县| SHOW| 仁布县| 融水| 莎车县| 和田县| 万载县| 宝丰县| 常德市| 靖宇县| 迁安市| 东山县| 留坝县| 平陆县| 鄂州市| 蓬溪县| 南华县| 威信县| 连州市| 博白县| 赣州市| 绍兴市|