Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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.

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

http://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?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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