Code Monkey home page Code Monkey logo

vim-automatic-ctags's Introduction

automatic-ctags.vim

Don't use this plugin yet, work in progress

I wrote this plugin to generate ctags files for all my projects. I use ctags in combination with FuzzyFinder.vim to move around, a fast way to "take me to this method".

    <C-i> :FufTag <CR>

This plugin generates and updates ctags and keep them in the project root directories. It locates the project root directory searching for specific files that indicates a code project. By default its .git and Gemfile.

  • :AutomaticCtags will regenerate the tagsfile

Map this to a key, trigger it on every save or just run it when you need to generate tags. Since the plugin traverses the every dir down to you home directory, its a good idea only running the command when you know it will hit one of your filenames that indicates a project.

    autocmd BufWritePost *.rb :call AutomaticCtags()
    map <F1> AutomaticCtags

Installation

If you don't have a preferred installation method, I recommend installing pathogen.vim with vim-update-bundles

Add place all your plugins to your .vimrc using

    " Bundle: tilljoel/vim-automatic-ctags       # https://github.com/tilljoel/vim-automatic-ctags

Configuration

Add these lines to your .vimrc and change them for your needs. The default values are the ones below so if they are good you can skip these lines.

    let g:automatic_ctags_files=".git,Gemfile"
    let g:automatic_ctags_cmd="ctags"
    let g:atomatic_ctags_filename="tags"

Add .gitignore settings globally since we create a lot of tags-files now.

    git config --global core.excludesfile ~/.gitignore
    printf "tags" >> ~/.gitignore

Make sure you set your tags variable also, This will look in the current directory for "tags", and work up the tree towards root until one is found.

    set tags=./tags;/

Contributing

Fork it, fix it. Its my first vim plugin ever.

Follow

Just hit follow here on GitHub or find me on:

vim-automatic-ctags's People

Contributors

tilljoel avatar

Stargazers

 avatar  avatar

Watchers

 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.