Giter Club home page Giter Club logo

guard-ctags-composer's Introduction

Guard-CTags-Composer

=

Guard-CTags-Composer generates ctags for your PHP project and for vendor libs. For project tags file tags is generated, for vendor tags file gems.tags is generated.

Features

  • When you run composer install in your project, vendor.tags file is automatically is generated or updated.
  • When you save one of you project's php files, tags file is automatically generated or updated.

Install

Make sure you have Guard installed.

Install the gem:

$ gem install guard-ctags-composer

Add a basic setup to your Guardfile:

$ guard init ctags-composer

Usage

$ guard

For more info, read Guard usage doc

Guardfile Options

:src_path => ".", # source path to be scanned for tags (default `src`)
:vendor_path => ".", # source path to be scanned for vendor tags (default `vendor`)
:name_patterns => ["\\*.php", "\\*.yml"], # name patterns to search for (default `["\\*.php"]`)
:emacs => false, # run ctags in emacs mode and merge `tags` and `vendor.tags` into `TAGS` file

For a typical Symfony2 application, Guardfile can look like this (default):

guard 'ctags-composer', :src_path => ["src"], :vendor_path => ["vendor"] do
  watch(/^(src)\/.*\.php/)
  watch('composer.lock')
end

CTags

Ctags generates an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located by a text editor or other utility. A tag signifies a language object for which an index entry is available (or, alternatively, the index entry created for that object).

In ubuntu you can install ctags by running

$ sudo apt-get install exuberant-ctags

Vim

Vim supports ctags by default. All you need to do is add your vendor.tags file to the Vim's tag stack.

set tags+=vendor.tags

Emacs

Ctags can be used with emacs too. Add :emacs => true option to your Guardfile and ctags will be generated with -e option:

guard 'ctags-composer', :emacs => true do
  watch(/^(src)\/.*\.php/)
  watch('composer.lock')
end

Fork

This version is a forked edition of guard-ctags-bundler gem.

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.