Installing Exuberant Ctags on Windows (Vista and XP)
Asked Answered
G

3

29

I want to use Exuberant Ctags on Vista (and probably the XP laptop) at work; no choice about the OS. I'm use GVim instead of the Flex Builder recommended by my co-worker, because the FB is buggy and doesn't do what GVim does, anyway. I got the zip file here. The Ctags install file says, among other things:

    mk_bc3.mak    For MSDOS using Borland C/C++ 3.x
    mk_bc5.mak    For Win32 using Borland C++ 5.5
    mk_djg.mak    For MSDOS using DJGPP Gnu GCC (better to follow Unix install)
    mk_ming.mak   For Win32 using Mingw32
    mk_mvc.mak    For Win32 using Microsoft Visual C++

I don't really understand what all that means (I have some grasp of each idea individually, but not put together like this), but I chose the last option as sounding Most Likely to Succeed. I opened the command prompt as Administrator, cd'd to the unzipped ec57w32 folder, and typed mk_mvc.mak.

Visual Studio welcomed me to the conversion wizard, offered to make a backup before proceeding to which I assented, and conversion failed. The conversion log says, Cannot load the project due to a corrupt project file. Same thing happened when I downloaded again, unzipped again, and did not make backup files; and also when I tried each of the other mk commands. There weren't any other choices along the way.

What else can I try?

Geanticline answered 13/4, 2009 at 22:5 Comment(0)
P
11

The windows zip file already contains a compiled ctags.exe, so you should not need to do a build yourself. Open CMD and have a look at ctags from there.

Pyroligneous answered 13/4, 2009 at 22:10 Comment(2)
Nuts. Ctags doesn't support mxml.Geanticline
kajaco said: 'Nuts. Ctags doesn't support mxml.'. If you have the regexp version of ctags executable, it is fairly easy to configure in a new language definition using just a few regular expressions: zeusedit.com/zforum/viewtopic.php?t=3367Magdalenemagdalenian
D
43

The exuberant ctags binary is pre-built and available for download at http://ctags.sourceforge.net/

  1. Unzip the file contents to somewhere like C:\Program Files\ctags
  2. Then add the ctags.exe path to your PATH environment variable.
    1. In XP, right click on My Computer and select Properties.
    2. Move to the Advanced tab and click the Environment Variables button.
    3. Click the System variables select box, find and highlight the Path variable.
    4. Click the Edit button.
    5. Append to the Variable Value ";C:\Program Files\ctags" (without the quotes).

Now in the command shell you should be able to use the command ctags to generate your tags. To create the tags file:

ctags -R "C:\Documents and Settings\My User\My Documents\My Code"

Since you are using vim, you probably want the taglist plugin (which I would link to if I had enough reputation). You do not need to create the tags file to use this plugin.

Didier answered 13/4, 2010 at 16:45 Comment(2)
I have tried the above mentioned steps with my windows gvim. But its not working. I am getting the error message as E433: No tags file while clicking the ctrl + ].Jamshid
Note that you also have to tell Vim where to look for the tags file. See :help tags-option.Sima
P
11

The windows zip file already contains a compiled ctags.exe, so you should not need to do a build yourself. Open CMD and have a look at ctags from there.

Pyroligneous answered 13/4, 2009 at 22:10 Comment(2)
Nuts. Ctags doesn't support mxml.Geanticline
kajaco said: 'Nuts. Ctags doesn't support mxml.'. If you have the regexp version of ctags executable, it is fairly easy to configure in a new language definition using just a few regular expressions: zeusedit.com/zforum/viewtopic.php?t=3367Magdalenemagdalenian
M
4

If you have the option, I would think the path of least resistance would be to use Cygwin. If you install cygwin and the ctags package from cygwin, you'll just need to open up the cygwin shell and run ctags (or maybe ctags -R if you want it to be recursive, which you probably do) from your source code directory. No need to build anything this way.

Marindamarinduque answered 13/4, 2009 at 22:10 Comment(1)
hmm... if what eddiegroves says is true, then you don't need cygwin... just run the command I mention, set gVim to look for the tags file in the right place, and you'll be all set.Marindamarinduque

© 2022 - 2024 — McMap. All rights reserved.