Code Monkey home page Code Monkey logo

Comments (6)

ludovicchabant avatar ludovicchabant commented on May 16, 2024

Hi, sorry for the late reply.
The generated tag file is always for the whole project. What I meant in the README is that if you save one file, it will only parse that one file and update the tag file, instead of parsing the whole project (which most Vim plugins do).
So if you have a project with 3000 files in it, the initial cost of creating the tag file will be the cost of running ctags on 3000 files. But then if you edit app/public/foo.js and add a new function bar(), the tag file will contain all the symbols from the 3000 files, plus the new bar(), and it did this at the cost of only re-parsing app/public/foo.js.
Does that make sense?

I don't see why you would want to end up with a file that only contains the tags of the one file you just saved, actually.

from vim-gutentags.

cvlmtg avatar cvlmtg commented on May 16, 2024

yes, it makes sense, but the problem is that the plugin doesn't act that way. i'll try to rephrase my problem:

I have a project with 3000 files.
I generate a tag file with 1000 files (since the other 2000 are excluded)
I edit foo.js and add bar()
now the tag file includes 3000 files plus bar()

the 2000 files which were excluded are added even if they are not supposed to...

from vim-gutentags.

ludovicchabant avatar ludovicchabant commented on May 16, 2024

Ah ok.
How did you generate the project the first time? Did you run ctags yourself? If so, did you use some command line arguments to exclude the 2000 files, or used a custom options file? If so, Gutentags needs to know about it, so it can run ctags the same way you did, and excludes the files correctly. With the very latest version of the plugin, place a .gutctags options file at the root of your project and write the exclude rules in it (see the ctags documentation for more details about options files). Gutentags will use this options file when generating tags.
If however you had your rules defined globally with the user options file (I believe it's the ~/.ctags file?), it should be picked up automatically.

from vim-gutentags.

cvlmtg avatar cvlmtg commented on May 16, 2024

i generated the tag manually as explained in the first message. the command was:

ctags --exclude='app/public/components/*' app/

I have a .ctags file but it doesn't define the excluded file, I'll try the .gutctags file, thanks

from vim-gutentags.

ludovicchabant avatar ludovicchabant commented on May 16, 2024

Oh wow, sorry, I must have been drunk when I read your first message! (which is no small feat since I don't drink alcohol).
So yeah, add that exclude clause to the .gutctags file and it should work. Reopen this bug if it doesn't!

from vim-gutentags.

cvlmtg avatar cvlmtg commented on May 16, 2024

thanks :) i'll do some tests as soon as I've some time :)

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.