8

I am a regular gVim user on Windows, but don't do much more than install it, set up my small _vimrc file, and go.

Now I am trying to both understand gVim Omni completion, and get it to work (I found out about it via haXe).

Reading :help new-omni-completion, I saw something about ctags.

But going to the ctags site, their site confused me.

What does ctags do, why do I want it?

And the most important part: how do I install it?

The page and docs that came with the source + binary archive I downloaded are confusing about installing (and seem to focus mostly on Linux, though I'm using Windows). Most of them talk about compiling from source, and don't say what to do with the resulting binary (which the archive I downloaded already contained, pre-compiled).

2 Answers 2

5

ctags is a tool which is able to create a so called tags files. a tags file is essentially an index. vim is able to parse that file and knows, where certain patterns are.

eg.: you have a file foo.h where a function foo_world() is declared. ctags parses foo.h and puts a mark into the index-file tags where it stores the file and linenumber to foo_world(). in vim you are then able to jump directly to that mark. or autocomplete structures, classes, function names etc.

ctags is able to extract such information for a wide variety of programming languages. you only need ctags if you are a programmer and if you find that 'jump to that position in that other file' usefull.

3
  • Helpful answer, but the question I'm having the most trouble with is the last one: "how do I install it?" :) The Windows archive includes a bunch of source, makefiles, and a couple executables, and help documents. But the help documents seem linux focused, and don't offer much help with gVim on Windows. Do I have to run ctags manually on each gVim source file? Jul 2, 2011 at 20:04
  • errr I mean "source file" not "gVim source file" :) Yes, I'm trying to use it as an IDE... Jul 2, 2011 at 20:20
  • 2
    you grab the binary from ctags.sourceforge.net and drop ctags.exe next to gvim.exe. done.
    – akira
    Jul 3, 2011 at 8:01
0

Found my answer on Stack Overflow (even though this is an installation issue, and I think isn't just programming related).

https://stackoverflow.com/questions/745560/installing-exhuberant-ctags-on-windows-vista-and-xp

Accepting the other answer (Akira's) because it explains the rest of the question: What is ctags, and why do I want it?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .