Sponsored Content
Full Discussion: ctags and vim
Top Forums UNIX for Dummies Questions & Answers ctags and vim Post 70347 by armen on Wednesday 27th of April 2005 11:05:55 PM
Old 04-28-2005
ctags and vim

hi all,
so i ran ctags recursively on a list of source files in my directory.
a tags file was created.
however, when i run vim filename,
i c the colors on the funcs, tags and so on,
but when i try to navigate from one src to another src by pressing 'ctrl ]'
i get an error reading...
"no tags found"
"foo.h tag not found"

how can i fix this error?
does this have anything to do with "tags" file?
even when i try
":set tags=my_directory_where_tags_located",
it doesn't work
 

9 More Discussions You Might Find Interesting

1. Solaris

Vim 7.0

I want to install VIM 7.0 from sunfreeware.com onto a server. The security guys are giving me a hard time because they found this security vulnerability. http://xforce.iss.net/xforce/xfdb/6259 This vulnerability came out in 2001, and it looks like it was mostly for linux, but I cant be... (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

2. UNIX for Dummies Questions & Answers

Need some help with vim

I use vim for writing code. I was using nano but found that vim is a much advanced editor. I am trying to achieve something like this: When trying a loop or a function, I generally type: function name() {} Now when I take my cursor one position to the left and press the return key, it give... (4 Replies)
Discussion started by: Legend986
4 Replies

3. UNIX for Advanced & Expert Users

Ctags in VIM Editor

Hi, I want to use ctags for multiple folders containing .c and .h files. Can anyone help me with it? I have been using ctags for 1 folder at a time but I would like to link multiple folders and access all .c files at a time using ctags. Thanks, shahsm (1 Reply)
Discussion started by: shahsm
1 Replies

4. UNIX for Advanced & Expert Users

About Vim

Hello, what is the maximum size of a file that we can open using vim. (3 Replies)
Discussion started by: nagalenoj
3 Replies

5. UNIX and Linux Applications

Help with Vim

How do I use compilers and syntax highlighting in (g)Vim? Specifically, I need a Common Lisp compiler and a C++ compiler. Thanks in advance! (Note: Disregard my other topic.) (1 Reply)
Discussion started by: led3234
1 Replies

6. UNIX for Dummies Questions & Answers

looking for vi (not vim) ctags tutorial

Hello all im looking for beginner tutorial about ctags and vi ( not vim) but all i find how to setup the ctags in vim can some one please point me to tutorial about vi + ctags thanks (2 Replies)
Discussion started by: umen
2 Replies

7. UNIX for Advanced & Expert Users

vim

Does anyone know the fast way to go to tab/2 distance in vim. I mean set four spaces. (1 Reply)
Discussion started by: mirusnet
1 Replies

8. Solaris

Very Importan - Vim Settings - Error while opening a File using vim

I downloaded vim.7.2 and compiled the vim source . Added the vim binary path to PATH (Because iam not the root of the box) when i load the file using vim it throws me an error Error detected while processing /home2/e3003091/.vimrc: line 2: E185: Cannot find color scheme darkblue line... (0 Replies)
Discussion started by: girija
0 Replies

9. UNIX for Advanced & Expert Users

Vim :f

Can someone please tell me what this does? :f word I thought that was the way to save files with a different name but after a quick google search I saw it was like this. :w filename (4 Replies)
Discussion started by: cokedude
4 Replies
REF(1)							      General Commands Manual							    REF(1)

NAME
ref - Display a C function header SYNOPSIS
ref [-t] [-c class]... [-f file]... tag DESCRIPTION
ref quickly locates and displays the header of a function. To do this, ref looks in the "tags" file for the line that describes the func- tion, and then scans the source file for the function. When it locates the function, it displays an introductory comment (if there is one), the function's declaration, and the declarations of all arguments. SEARCH METHOD
ref uses a fairly sophisticated tag look-up algorithm. If you supply a filename via -f file, then elvis first scans the tags file for a static tag from that file. This search is limited to the tags file in the current directory. If you supply a classname via -c class, then elvis searches for a tag from that class. This search is not limited to the current direc- tory; You can supply a list of directories in the environment variable TAGPATH, and ref will search through the "tags" file in each direc- tory until it finds a tag in the desired class. If that fails, ref will then try to look up an ordinary global tag. This search checks all of the directories listed in TAGPATH, too. If you've given the -t flag, then ref will simply output the tag line that it found, and then exit. Without -t, though, ref will search for the tag line. It will try to open the source file, which should be in the same directory as the tags file where the tag was discov- ered. If the source file doesn't exist, or is unreadable, then ref will try to open a file called "refs" in that directory. Either way, ref will try to locate the tag, and display whatever it finds. INTERACTION WITH ELVIS
ref is used by elvis' shift-K command. If the cursor is located on a word such as "splat", in the file "foo.c", then elvis will invoke ref with the command "ref -f foo.c splat". If elvis has been compiled with the -DEXTERNAL_TAGS flag, then elvis will use ref to scan the tags files. This is slower than the built-in tag searching, but it allows elvis to access the more sophisticated tag lookup provided by ref. Other than that, external tags should act exactly like internal tags. OPTIONS
-t Output tag info, instead of the function header. -f file The tag might be a static function in file. You can use several -f flags to have ref consider static tags from more than one file. -c class The tag might be a member of class class. You can use several -c flags to have ref consider tags from more than one class. FILES
tags List of function names and their locations, generated by ctags. refs Function headers extracted from source files (optional). ENVIRONMENT
TAGPATH List of directories to be searched. The elements in the list are separated by either semicolons (for MS-DOS, Atari TOS, and Amiga- Dos), or by colons (every other operating system). For each operating system, ref has a built-in default which is probably ade- quate. NOTES
You might want to generate a "tags" file the directory that contains the source code for standard C library on your system. If licensing restrictions prevent you from making the library source readable by everybody, then you can have ctags generate a "refs" file, and make "refs" readable by everybody. If your system doesn't come with the library source code, then perhaps you can produce something workable from the lint libraries. SEE ALSO
elvis(1), ctags(1) AUTHOR
Steve Kirkendall kirkenda@cs.pdx.edu REF(1)
All times are GMT -4. The time now is 05:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy