Code Monkey home page Code Monkey logo

Comments (2)

wow-yes avatar wow-yes commented on June 5, 2024

As what I understand, you want to create different tagfiles for different files of one repos.

So, for example, we have cpp and py files in a repos. How to create two tags for cpp and py respectively?Here is my solution.

let g:gutentags_ctags_tagfile=&filetype.'.ctags' #optional 
au BufEnter,BufRead * let g:gutentags_ctags_tagfile=&filetype.'.ctags'

use echo g:gutentags_ctags_tagfile in vim to check your tagfile name when you open a file or switch between two files.

from vim-gutentags.

ludovicchabant avatar ludovicchabant commented on June 5, 2024

That's a nice trick @wow-yes thanks.

I think @marcelolima was maybe asking about switching the tagfile used for looking up a symbol? In that case, I think that temporarily setting the tags variable would work (see :help 'tags'), but frankly vim does a good job of handling multiple tag files anyway, so setting that variable to both tag files (separated by a space or comma) would let vim search both when typing g]. Usually gutentags sets that variable automatically but that could mess-up your setup in this case, so you can disable that with g:gutentags_ctags_auto_set_tags.

from vim-gutentags.

Related Issues (20)

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.