From owner-freebsd-questions@FreeBSD.ORG Thu Dec 9 06:52:17 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49BF316A4CE for ; Thu, 9 Dec 2004 06:52:17 +0000 (GMT) Received: from osgood.cc.nd.edu (osgood.cc.nd.edu [129.74.250.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0903B43D5C for ; Thu, 9 Dec 2004 06:52:17 +0000 (GMT) (envelope-from dmschei@attglobal.net) Received: from [10.0.1.2] (scheidt-rout.canopy.nd.edu [129.74.98.169]) (authenticated bits=0)iB96qEGH000564 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Thu, 9 Dec 2004 01:52:15 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: David Scheidt Date: Thu, 9 Dec 2004 01:52:16 -0500 To: freebsd-questions@freebsd.org X-Mailer: Apple Mail (2.619) X-ND-MTA-Date: Thu, 09 Dec 2004 01:52:16 -0500 (EST) X-ND-Virus-Scan: engine v4.3.20; dat v4412 cc: Phoenix Yuan Subject: Re: What's the proper way to use ctags? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2004 06:52:17 -0000 > > Let say I want to quickly browse through all the source files in a > given > directory. What I tried was I ran ctags -R source_dir, which builds a > tag file for the entire source. When I start vim in that directory and > view files in the sub directories, tag works just fine. But when I go > into other directory(outside of vim), since there is no tag file there, > I can't use the tag feature anymore. > > I could ran ctag in all sub directories, but then I won't be able to > search for functions that are define outside of the sub directory. So > what's the proper way to use ctag? > You need to tell vim where your tag files are. :set tags=./tags,/path/to/your/tags (note the lack of a space character there!) I think the default is just ./tags. Or perhaps it's "tags,./tags". I don't remember. Read the vim help files on tags :help tags Regards, David