Ctags for PHP

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

Ctags for PHP

Postby geomouchet » Fri Dec 17, 2004 12:36 am

I'd like to use ctags in UltraEdit when programming PHP. My ctag options are as follows:
Default Tagfile: C:\Program Files\UltraEdit\tags.lst
ctag exe path/name: C:\Program Files\ctags554\ctags.exe
ctag parameters: -L %fi -f %fo

I downloaded Exuberant Ctags and did a Project/Create Ctag File in UltraEdit. After doing that my tags.lst has only the following:
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME Exuberant Ctags //
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
!_TAG_PROGRAM_VERSION 5.5.4 //

And in UltraEdit, if I select a PHP command and hit F11, it says, "Could not find TAG."

I'm using UltraEdit version 10.00c. Please help. What do I need to do to make this work?
User avatar
geomouchet
Newbie
 
Posts: 4
Joined: Fri Dec 17, 2004 12:00 am

Re: Ctags for PHP

Postby Mofi » Fri Dec 17, 2004 3:37 am

Looks correct. What extension have your php files. Ctags only detect *.php *.php3 and *.phtml automatically as PHP. If your files have a different extension, use following parameters --language-force=PHP -L %fi -f %fo.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3936
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Ctags for PHP

Postby geomouchet » Mon Dec 20, 2004 1:01 am

The extension is php, so that's not the problem, but thanks for the suggestion.
User avatar
geomouchet
Newbie
 
Posts: 4
Joined: Fri Dec 17, 2004 12:00 am

Re: Ctags for PHP

Postby Manni » Mon Dec 20, 2004 4:44 am

Are those project files local files or ftp files? I don't think that Uedit's ctags support will work with remote files.

Manni
User avatar
Manni
Advanced User
Advanced User
 
Posts: 58
Joined: Thu Jul 15, 2004 11:00 pm
Location: Europe

Re: Ctags for PHP

Postby geomouchet » Mon Dec 20, 2004 5:40 pm

They're local files.
User avatar
geomouchet
Newbie
 
Posts: 4
Joined: Fri Dec 17, 2004 12:00 am

Re: Ctags for PHP

Postby Mofi » Tue Dec 21, 2004 2:54 am

Maybe your PHP file does not contain any tag which is recognized by ctags. Have you ever tried to run ctag with your php file directly to check, if ctags find any tag. The command line is:

"C:\Program Files\ctags554\ctags.exe" -f "C:\Program Files\UltraEdit\tags.lst" "your file with path"

Check also that the environment variables TEMP and TMP are set to a directory, which exist and you have write access.

Try also -L "%fi" -f "%fo" as ctag options.

If nothing works, download Filemon from SysInternals (Microsoft) and run it during ctags execution from UltraEdit. Use filter with "Include" setting uedit32;ctags instead of *. Look at the log after execution. Maybe you can find, why it doesn't work.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 3936
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Ctags for PHP

Postby anonymous718 » Thu May 14, 2009 6:10 pm

Just an FYI for other PHP programmers.

I usually include functions and configuration info in .inc files. To make ctag be able to read all the symbols from the .inc files, as well as the .php files, I use the following ctag options:
Code: Select all
Default Tagfile: C:\Program Files\IDM Computer Solutions\UltraEdit\tags.lst
ctag exe path/name: C:\Program Files\IDM Computer Solutions\UltraEdit\GNU\ctags.exe
ctag parameters: --langmap=php:.php.inc -L %fi -f %fo
anonymous718
Basic User
Basic User
 
Posts: 10
Joined: Wed May 13, 2009 10:40 pm


Return to Custom User Tools/Tool Configuration