what are ctags for?

Help with setting up and configuring custom user tools in UltraEdit (based on command line input)

what are ctags for?

Postby JohnJSal » Sun Oct 01, 2006 10:34 pm

I was a little confused by the description in the docs. Are ctags some kind of autocomplete function, or is it just for searching for tags in files?

Also, if I want to add another taglist to my current taglist.txt file, do I just copy/paste it at the bottom? Do I need to remove the section that says:

[TagList]
ActiveGroup=XML - Tags

Or is it okay to have this multiple times in one file? (Currently my taglist file has this with HTML as the active group.)

Thanks.

P.S. If ctags are not for autocompleting, is there a way to have autocompletion for HTML and XML tags in UE?
User avatar
JohnJSal
Advanced User
Advanced User
 
Posts: 60
Joined: Sat Mar 05, 2005 12:00 am

Re: what are ctags for?

Postby Acid » Sun Oct 01, 2006 11:48 pm

http://ctags.sourceforge.net/

The ctag files get "renderd" in the class viewer. And UE should automatically auto complete HTML and XML tags. Otherwise you can always check out the download section for the appropriate tag lists and the readme how to install them.
User avatar
Acid
Basic User
Basic User
 
Posts: 21
Joined: Thu Jan 26, 2006 12:00 am

Re: what are ctags for?

Postby JohnJSal » Mon Oct 02, 2006 1:10 am

HTML and XML tags are not autocompleted for me. But if it's supposed to, then how do I turn this on? ctags don't seem to be the same thing. I suppose ctags are for autocompletion of qualified objects, for example, and that sort of thing?

Edit: I downloaded Exuberant Ctags but I don't know what I'm supposed to do with it. I put the .exe file in my UE directory, then opened python.c and went to Project --> Create CTAG File, but nothing happened. How am I supposed to generate a ctag file and then subsequently use it?
User avatar
JohnJSal
Advanced User
Advanced User
 
Posts: 60
Joined: Sat Mar 05, 2005 12:00 am

Re: what are ctags for?

Postby Bego » Mon Oct 02, 2006 8:32 am

Hi guys,

the main reason of using ctags is the "jump to" function.
If you work with an up to date ctag list, you can mark your procedure and then press (F11 I guess is default, see menu "search-Find symbol"). So you jump to the definition of this program unit and so on.
So you can easily "cross" through your code without having to open this file and then that file and so on. You see ?
See also help file of UE by searching for "ctags".

Main disadvantage for me: It does NOT work on ftp-unix files/projects :-(

By the way: If you dont want to use Ctags but want to jump to the definition of a procedure in your ONE LOCAL file, this macro may give you a try.
It does "shift-F2 in Visual Basic 6" and I called it gotoDefinition.
And, yes, it's not perfect but it fits my needs.

rem example
rem bla bla
procedure test
rem here we go
end test
rem bla moer code here
call test() <cursor on "test" then run macro. You will land in line 3 "procedure test"
rem bla



Code: Select all
InsertMode
ColumnModeOff
HexOff
Clipboard 9
SelectWord
Copy
Bottom
Find Up "FUNCTION ^c"
IfNotFound
Bottom
Find Up "PROCEDURE ^c"
IfNotFound
Bottom
Find Up "int ^c"
IfNotFound
Bottom
Find Up "void ^c"
IfNotFound
Bottom
Find Up "sub ^c"
EndIf
EndIf
EndIf
EndIf
Clipboard 0
User avatar
Bego
Master
Master
 
Posts: 357
Joined: Wed Nov 24, 2004 12:00 am
Location: Germany

Re: what are ctags for?

Postby Mofi » Mon Oct 02, 2006 10:31 am

Hi Bego!

Find Symbol with Ctags works also without selection. Place the cursor anywhere inside the function, variable, definition, constant, .... and press F11.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4066
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: what are ctags for?

Postby Bego » Mon Oct 02, 2006 12:04 pm

Lo Mofi !

I knew, but I don't know why I always mark the word anyway.
bad habits die hard :-)
User avatar
Bego
Master
Master
 
Posts: 357
Joined: Wed Nov 24, 2004 12:00 am
Location: Germany


Return to Custom User Tools/Tool Configuration