Code Monkey home page Code Monkey logo

Comments (22)

justinmk avatar justinmk commented on May 23, 2024

👍 The gutentags: The tags file is already being updated, please try again later message is totally obnoxious. This does not deserve a "Press ENTER". If the plugin is doing its job, I don't need to know about it. I suggest removing that message.

from vim-gutentags.

ludovicchabant avatar ludovicchabant commented on May 23, 2024

About the message, that's weird, for me it just displays but does not prompt to press Enter? (it just flashes in the status bar). Got any idea what the difference might be?

About the original post, yes, Gutentags will go through the entire project. It's got no way to know to use your cscope.files filter, or any other filter for that matter. So what might be going on is that Gutentags kicks off ctags, then you quit and restart Vim, and the ctags process is still running, so you get the message? Although if you still get the message after the process has ended, then that might be another bug.

from vim-gutentags.

ludovicchabant avatar ludovicchabant commented on May 23, 2024

To tell Gutentags about the filter, with the latest version, you could try creating a .gutctags file at the root of your project, with those options in it (I think ctags wants one per line):

--extra=+f 
-L cscope.files

from vim-gutentags.

ronakg avatar ronakg commented on May 23, 2024

Okay, I'll give .gutctags a try. Is the version here on github not the latest one? Install instructions ask to use the version from bitbucket. And it does look like bitbucket version was updated more recently.

from vim-gutentags.

ronakg avatar ronakg commented on May 23, 2024

Tried .gitctags but the update script is still not using it.

19646 pts/4 S 0:00 /bin/sh /users/ronakg/my-dot-files/vim/bundle/vim-gutentags/plat/unix/update_tags.sh -e ctags -t /nobackup/ronakg/rp3/tags -p /nobackup/ronakg/rp3

19647 pts/4 R 0:30 ctags -R -f /nobackup/ronakg/rp3/tags.temp /nobackup/ronakg/rp3

from vim-gutentags.

ludovicchabant avatar ludovicchabant commented on May 23, 2024

The Github version should be the latest one, yeah. I'm using Mercurial primarily, so the version on Github is just a mirror, but it's up to date (I always push to both Github and Bitbucket at the same time actually).

Was that a typo in your second message or did you name the file wrong? It should be .gutctags. See the code here, where it should be adding it as a -o option to the update_tags.sh script, which would in turn pass it to ctags.... of course there's also the possibility of a bug :)

from vim-gutentags.

ronakg avatar ronakg commented on May 23, 2024

The typo was in my comment here, the file I created in workspace is fine.

Looks like I need to create .gutctags file where my cscope.files is present. The script doesn't pick up .gutctags file from my home directory, right? I'm not the expert at vimscript.

from vim-gutentags.

ronakg avatar ronakg commented on May 23, 2024

Closed by mistake.

from vim-gutentags.

ronakg avatar ronakg commented on May 23, 2024

After creating .gutctags at root of the project, the update script is picking up the options but ctags process never finishes.

7843 ? R 9:33 ctags -R -f /nobackup/ronakg/rp3/tags.temp --options=/nobackup/ronakg/rp3/.gutctags /nobackup/ronakg/rp3

from vim-gutentags.

ludovicchabant avatar ludovicchabant commented on May 23, 2024

If you run this command line manually, does it complete in a normal time frame?

from vim-gutentags.

ronakg avatar ronakg commented on May 23, 2024

No it doesn't. It is going through the entire project (really really huge) because of -R flag. I think when the options file is present, you should not have -R flag for ctags.

from vim-gutentags.

ronakg avatar ronakg commented on May 23, 2024

Removing -R flag from ctags works fine.

from vim-gutentags.

ronakg avatar ronakg commented on May 23, 2024

I created a pull request to not use -R flag when options file is present.

from vim-gutentags.

ludovicchabant avatar ludovicchabant commented on May 23, 2024

I'll have to test when I come back to a computer, but are you sure it actually parses the subdirectories of your project? I get a feeling that, at best, the -R flag should not be present only if there's a file list provided in the options file... Most people would only use the options file only to provide ignore patterns, so they would need the recourse flag...

from vim-gutentags.

ronakg avatar ronakg commented on May 23, 2024

are you sure it actually parses the subdirectories of your project?

Yes, when I ran the command manually it showed errors in some files which it should not be scanning.

I get a feeling that, at best, the -R flag should not be present only if there's a file list provided in the options file...

Think of it this way. If a user is providing an options file, it means the user wants to take control of what options are passed to ctags (including -R) and the script should not assume things on its own and pass options to ctags itself.

Anyway, it's up to you to decide.

from vim-gutentags.

ludovicchabant avatar ludovicchabant commented on May 23, 2024

I'm mostly worried about the unknown number of users who currently have a .gutctags file that only lists exclude rules, and who, after this change, will see most of their tags disappear.

I think a better way would be to use Ctags' multiple options file support. Make a default options file that comes with Gutentags, which has --recurse=yes in it, and pass that first. Then pass the .gutctags file, in which you can specify --recurse=no if you want to disable that... it's got some downsides, since I could still break something if I add more stuff to the Gutentags default options file later, but that will probably be very rare. Also, it means you don't have to almost always add --recurse=yes in .gutctags, which I imagine many people would forget adding and then file bugs.

I've got the change written already, and it seems to work as expected. Any concerns?

from vim-gutentags.

ronakg avatar ronakg commented on May 23, 2024

This approach sounds good to me.

from vim-gutentags.

ludovicchabant avatar ludovicchabant commented on May 23, 2024

Done!

from vim-gutentags.

justinmk avatar justinmk commented on May 23, 2024

About the message, that's weird, for me it just displays but does not prompt to press Enter? (it just flashes in the status bar). Got any idea what the difference might be?

"Press ENTER" behavior depends on many things, including the height of the commandline, and whether any previous messages were posted before the next redraw. I see this gutentags: The tags file is already being updated, please try again later message on startup often, when I close and re-start Vim quickly. Then I get the "Press ENTER" thing, which is very unpleasant.

What is the purpose of the message? When would the user want to see it?

from vim-gutentags.

ludovicchabant avatar ludovicchabant commented on May 23, 2024

Ah ok, got it. The purpose of the message is if the user wants to manually trigger an operation to re-parse the current file or all the files in the project (:GutentagsUpdate!). If ctags is already running, it tells them nothing will be done right away. I guess the proper fix would be to only show the message after an actual user action (running the command) as opposed to an automatic action.

from vim-gutentags.

ludovicchabant avatar ludovicchabant commented on May 23, 2024

So that last bit should be fixed with 02a9f07.

from vim-gutentags.

justinmk avatar justinmk commented on May 23, 2024

@ludovicchabant Thanks :)

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.