Skip to content

tilljoel/vim-automatic-ctags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

Generate ctags for my projects whenever i save a file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published