Giter VIP home page Giter VIP logo

tagsetting.vim's Introduction

This is a mirror of http://www.vim.org/scripts/script.php?script_id=1398

There's two functions provided here.  The first is SetTags() which will scan all of the directories from your current working directory to the root directory for a file called "jtags" (who can rename it to just tags if you want).  If it finds a jtags file, it adds it to the tags option. 

I use SetTags() when switching back and forth between different projects that have different tags files at their root level.  

The second function is GenerateTags() which works similar to the above script.  It starts at your current working directory and scans all of the directories above it looking for a file called "build.xml" (you can use any file you want).  When it finds this file, it assumes that it is at the top of your directory structure and will run the ctags command to generate a new tags file.  By default it creates a tags file called "jtags" at that top level.  I use build.xml to indicate the top level because I generally use Ant and the ant build file is a good way to recognize the top of the project in the directory structure.

The two functions have been mapped to commands to save typing.  Those commands are:

map <unique> <Leader>tj <ESC>:call SetTags()<CR>
map <unique> <Leader>tg <ESC>:call GenerateTags()<CR>

tagsetting.vim's People

Stargazers

 avatar

Watchers

 avatar  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.