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).


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.

| improve this answer | |
  • 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? – Merlyn Morgan-Graham Jul 2 '11 at 20:04
  • errr I mean "source file" not "gVim source file" :) Yes, I'm trying to use it as an IDE... – Merlyn Morgan-Graham Jul 2 '11 at 20:20
  • 2
    you grab the binary from ctags.sourceforge.net and drop ctags.exe next to gvim.exe. done. – akira Jul 3 '11 at 8:01

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


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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.