Quick source code locating tool-qwandry User Guide

Source: Internet
Author: User

GitHub address: https://github.com/adamsanderson/qwandry

Qwandry can quickly locate the tools we need to find library files and projects.

There are many methods for Fast Location in Ruby, And I know three of them:

cd `bundle show active_record`

Use the tag method (tag location is more accurate and the method level can be located)
Or through qwandry
Install


gem install qwandry

Use

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

Specify editor to open

EDITOR=subl qw activerecord 3.2.14

How to customize it?


touch ~/.qwandry/init.rb

Copy the following content to the file.

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

Explanation

The register method is to package the specified directory.

Add directory to search

Default indicates the default search range.

Basic Principle of implementation

Package many directories into packages by configuring config, and then Package them into a Repository (warehouse)
Initialize a Launcher (with Editor, etc)

Find the package in the corresponding Repository based on the input name (actually a directory address)

Execute the system command: editor (vim) path

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.