how do you make a ctag file?

how do you make a ctag file?

601
Advanced UserAdvanced User
601

    Oct 04, 2006#1

    I saw a post with an almost identical subject, but the response didn't really address the question. I'm hoping someone can explain this to me (the UE docs are lacking).

    I've downloaded the latest version of Exuberant Ctags and put the .exe file in my UE directory. Then I opened the "python.c" file and went to Project --> Create Ctag File, but nothing happened. I have no idea if that's what I was even supposed to do though.

    Hope someone can help, or at least point me toward some instructions.

    Thanks.

    6,681583
    Grand MasterGrand Master
    6,681583

      Oct 04, 2006#2

      There was no need to download ctags.exe from the Exuberant Ctags website. It comes already with the UE package. Look into the GNU subdirectory of the UltraEdit program directory.

      So you have first to look at Project - Ctag Options and set there the path to ctags.exe, the name and location for the default ctags output file and most important the options for ctags.exe.

      UltraEdit itself offers 2 special variables %fi and %fo for usage in the options field for ctags.exe. See help of UltraEdit for details. All other options are explained in the Manual on the Exuberant Ctags website. I'm pretty sure that you will need for Python with files with .c extension additional options, for example --language-force or --langmap.

      Next you should specify in your project the project specific ctags file and use the optional parameter Create CTAG file on project load or not.

      Then you should be able to create/update the ctags file for your project whenever you want with Project - Create CTAG file.

      If you don't have a project open or you have only a workspace only the file name of the active file is passed to ctags and so the default ctags file then contains only the symbol for this file. In my point of view only useful for single source file programs.

      You will not see any dialog or message when Ctags is executed and has finished it's job. Ctags creates/updates the ctag file for your project or active file always completely in the background. The goal for this program is to generate the symbol database (ctags output file) and not to be a pain in the neck of the user by displaying messages on every run.

      You can verify if the ctags file contains all the symbols for your language and your project files by opening the file (it's a normal text file) or better simply try for example with the cursor set on a function name if Search - Find Symbol finds the definition of that function.

      Hint: Use Search - Back (last position) to go back to the file/position before executing Find Symbol. And learn the key codes for these 2 special search functions of UltraEdit for efficient daily usage.
      Best regards from an UC/UE/UES for Windows user from Austria

      601
      Advanced UserAdvanced User
      601

        Oct 04, 2006#3

        Thanks very much, but I think it would help if I saw some kind of example. I still don't understand the process involved here. I have the ctags.exe file in the GNU directory (so far so good). The options are already set in "Ctag Options", I assume the default is good enough. My taglist.txt file contains tags for HTML and Cold Fusion (the default), but I chose that file as the one for my project. Then I had a Python file open and did "Create Ctag File", but nothing happened and F11 didn't work.

        Do I not need any of the files that come with the Exuberant Ctag download? I can make a ctag file for Python using just what comes with UE?