Code Monkey home page Code Monkey logo

quickref.vim's Introduction

quickref.vim

Motivation

When you write programs, you may want to view source codes of libraries, applications or something like that which you use. If you use this plug-in, you can view them without any effort!

Introduction

This plug-in provides quick access to any references in your local environment. Concretely, this can do these tasks:

  • Detects the current project root and add it to its own cache automatically.
  • Provides commands which adds specified paths to the cache and removes them from it.
  • Enable to select one of the paths quickly and executes an arbitrary task at it.

The third one uses the existing plug-ins which are so-called narrowing frameworks (currently only CtrlP, but planning to support Unite).

Usage

You can get a buffer which contains some project roots you have accessed to and some directories you have registered by running :Quickref command. You can narrow the selections by typing characters, choose one of them and executes specified task to it.

You have two ways to register arbitrary paths to the cache. First one is assigns them to g:quickref_paths variable like this:

let g:quickref_paths = [
    \ '~/A/B'
    " Wildcars are automatically expanded.
    \ '/C/*',
    " You want to exclude specified path, put '!' at the head.
    \ '! /C/D/'
]

Second one is running :QuickrefAdd and :QuickrefRemove command like this:

" Registers the current working directory.
:QuickrefAdd
" Registers specified path.
:QuickrefAdd ~/A/B
" Registers specified path which contains wildcars.
:QuickrefAdd /C/*
" Removes specified path .
:QuickrefRemove /C/D/
" You can register several different paths at the same time.
:QuickrefAdd ~/A/B /C/*

CtrlP

If you want to know the outline of using CtrlP interface, see its help. When running :Quickref command, you get CtrlP interface containing the registered paths and can select one of them by typing characters. You have four keys to execute specified task to it:

  • <Enter> to get CtrlP interface again in the selected path and select one or more of the files in it.
  • <C-t> to move the current directory to the selected one.
  • <C-v> to do the same thing as <C-t>
  • <C-x> to get the file-explorer in the selected path.

Requirement

Installation

You can use your favorite package manager to install this. If you don't have your own package manager for Vim, I recommend vim-plug to you!

quickref.vim's People

Contributors

iwataka avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.