Showing posts with label ctags. Show all posts
CTAGS Tips and Command
Wednesday, March 18, 2009
Run vim (full path /usr/misc/bin/vim)
Type :tj
You are there!
Tips
:tj[ump]
Jump to the tag directly when there is only one match
:tn[ext]
Jump to next matching tag
:tp[revious]
Jump to previous matching tag
:tf[irst]
Jump to first matching tag
:tl[ast]
Jump to last matching tag
:po[p] (or Ctrl+T)
Jump to older entry in tag stack
:ta[g]
Jump to newer entry in tag stack
:tags
Show the contents of the tag stack. The active entry is marked with a '>'
:tj /^get
Lists all the tags that starts with "get"
:tj /norm
Lists all the tags that contain "norm", including "id_norm"
:ts
Notes
*By default, Cltr+] is escape character for telnet. You can disable it through
Windows DOS: telnet -e ''
Unix: telnet -E
You should use dtterm (/usr/dt/bin/dtterm) to enable vim to support color mode
Posted in ctags, Unix, vim by Alex Yap | 0 comments
Email this postHow To Generate CTAGS and Configure It To Use With VIM?
Many of you wondering how to generate ctags and configure it to use with Vim? Here, you at the right place.
What is ctags?
According to ctags sourceforge.
Ctags generates an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located by a text editor or other utility. A tag signifies a language object for which an index entry is available (or, alternatively, the index entry created for that object).Below is 6 (six) simple steps to generate the ctags and use it with your vim.
Tag generation is supported for the following languages:
Assembler, AWK, ASP, BETA, Bourne/Korn/Zsh Shell, C, C++, COBOL, Eiffel, Fortran, Java, Lisp, Lua, Make, Pascal, Perl, PHP, Python, REXX, Ruby, S-Lang, Scheme, Tcl, Vim, and YACC.
Precondition:
- you need to have unix
- you need to have vim
Notes: you can generate ctags to use in windows but I haven't tried that before.
1. Download the ctags source from
http://www.sunfreeware.com/
http://ctags.sourceforge.net/
I'm using ftp://ftp.sunfreeware.com/pub/freeware/SOURCES/ctags-5.7.tar.gz
2. gunzip and untar it.
3. run ./configure
4. run make
if 'make' does not exist in global environment. Search for it by
find / -name make 2>/dev/null
[/gateways/yapywa/ctags/ctags-5.7]
12:37:35 > /usr/ccs/bin/make
--> after make you will see .C get compile and with .o output file.
5. cd to $HOME directory
6. Generate the tags
ctags -f --recurse --langmap= --languages= --verbose
[/gateways/yapywa]
12:37:35 >
/gateways/yapywa/ctags/ctags-5.7/ctags -f tags --recurse --langmap=C++:.C.h.c.cpp.hpp --languages=C++ --extra=+q --fields=+i --verbose /gateways/yapywa/ALU_CORE
7. SET CTAGS in VIM under .vimrc
se tags=/home/yapywa/tags
Posted in ctags, sourceforge, vim by Alex Yap | 0 comments
Email this post
Subscribe to:
Posts (Atom)