Code Completion Newbie Question
Code Completion Newbie Question
First appologies if this question has previously been answered. Im used to working with Visual Studio .Net for my work projects, but im looking at using Zeus for private work at home. Is it possible to a similar effect to the visual studio Ctrl- Space intellisense features?
Ive just downloaded the trial soft version of the software. and straight out of the box i just wanted to test with a simple c file. I wanted to do something simple like printf(). so i figured if i typed the first 3 or so characters of a std ansi c method that i might get a list of possible matches?
Perhaps im missing something simple, can could you provide any details? Thanks
Ive just downloaded the trial soft version of the software. and straight out of the box i just wanted to test with a simple c file. I wanted to do something simple like printf(). so i figured if i typed the first 3 or so characters of a std ansi c method that i might get a list of possible matches?
Perhaps im missing something simple, can could you provide any details? Thanks
Is it possible to a similar effect to the visual studio Ctrl-Space intellisense features?
The Zeus intellisense feature is automatically triggered by the space bar (provided it is enabled) but it is also possibel to bind the Zeus TagsComplete keyboard function to the Ctrl-Space keyboard to provide alternative keyboard driven intellisensing.
But for the intellisensing to work Zeus also requires a source of tags information.
This tags information is automatically created and maintained for any files contained in a Zeus workspace, but for third party files the tags information needs to be configured by the user using the Tags Database Builder utility.
For example, below are a few examples of how tags information can be configured for MFC and Java:
Unfortunately the Zeus intellisensing does not currently do partial word matchingi just wanted to test with a simple c file. I wanted to do something simple like printf(). so i figured if i typed the first 3 or so characters of a std ansi c method that i might get a list of possible matches?

As an example lets assume a tags database file has been created using the C header files as described in the links above. How the intellisensing in Zeus works is as follows:
- If I type in printf( Zeus will display the arguments for printf after the ( key is pressed.
- Alternatively I could place the cursor on the printf and use the Tags, Find Current Word menu to go to the header file containing the printf definition.

Repeating the above test using something like asinf( as the input better illustrates how things are meant to work, since there is some tags information for the asinf function. In this case Zeus displaying inline float asinf(float _X) as the intellisense tip

Cheers Jussi
Excellent, i look forward to that patch, now you just have to find a way for ctags to parse the MSVC headersjussij wrote:This feature looks as if it should be quite easy to implement, so expect to see it in the next Zeus patch due out in the next few weeksprovided the feature is not too difficult to implement, it should make it's way into an upcoming Zeus patch.
Cheers Jussi

Hi Jussi,
UPDATE: Just found this on the cTags Site.
Include extern tags. ctags will normally ignore extern declarations of functions or variables; that's handy when generating tags for your own programs. A tags file for the extern declarations in the system's standard header files can be a very handy resource, so this -e flag was created.
Im trying to build a tags database for some of my .h files. For some reason its just not find anything in the .H files.
Any chance i can send you the include folder with my .h files and get you to test.
Let me know if you can help do a test and i'll email you the files.. ( send me your address or whatever )
Here is a sample.h file Things like putchar can not be found by the tag finding feature.
#ifndef _STDIO_H
#define _STDIO_H
#define BUFSIZ 1024
#define EOF (-1)
#ifndef SEEK_SET
#define SEEK_SET 0
#endif
#ifndef SEEK_CUR
#define SEEK_CUR 1
#endif
#ifndef SEEK_END
#define SEEK_END 2
#endif
#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned int size_t; /* result type of the sizeof operator (ANSI) */
#endif
/* under constraction now */
#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
extern "C" {
#endif
extern int printf(char *fmt, ...); /**/
extern int sprintf(char *buffer, char *fmt, ...);
extern char getc(int); /**/
extern char getchar(void);
extern char *gets(char *);
extern void putc(char, int); /**/
extern void putchar(char);
extern void puts(char *);
#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
}
#endif
#endif /* _STDIO_H */
Thanks
UPDATE: Just found this on the cTags Site.
Include extern tags. ctags will normally ignore extern declarations of functions or variables; that's handy when generating tags for your own programs. A tags file for the extern declarations in the system's standard header files can be a very handy resource, so this -e flag was created.
Im trying to build a tags database for some of my .h files. For some reason its just not find anything in the .H files.
Any chance i can send you the include folder with my .h files and get you to test.
Let me know if you can help do a test and i'll email you the files.. ( send me your address or whatever )
Here is a sample.h file Things like putchar can not be found by the tag finding feature.

#ifndef _STDIO_H
#define _STDIO_H
#define BUFSIZ 1024
#define EOF (-1)
#ifndef SEEK_SET
#define SEEK_SET 0
#endif
#ifndef SEEK_CUR
#define SEEK_CUR 1
#endif
#ifndef SEEK_END
#define SEEK_END 2
#endif
#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned int size_t; /* result type of the sizeof operator (ANSI) */
#endif
/* under constraction now */
#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
extern "C" {
#endif
extern int printf(char *fmt, ...); /**/
extern int sprintf(char *buffer, char *fmt, ...);
extern char getc(int); /**/
extern char getchar(void);
extern char *gets(char *);
extern void putc(char, int); /**/
extern void putchar(char);
extern void puts(char *);
#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
}
#endif
#endif /* _STDIO_H */
Thanks
Unfortunately this looks like a limitation of the current Zeus 
Assuming the code above is contained in a file called test.h this is the command line Zeus runs to build the tags information:
where xtags.exe is just ctags.exe renamed to avoid name collisions. The contents of this tags file produced actually contains the function information defined under the prototype kind category.
The problem is the current Zeus ignores this prototype information
But what you can do is downlaod the latest Exuberant Ctags source code (see link in an earlier post) and edit this ctags file: c.c
At about line 287 you will see this:
Just change it to read:
Replace the xtags.exe with this new ctags.exe and Zeus should now detect this prototype information 
To fix this properly I will also make sure Zeus is changed to not ignore this prototype information.
Cheers Jussi

Assuming the code above is contained in a file called test.h this is the command line Zeus runs to build the tags information:
Code: Select all
xtags.exe --c-types=+fp --excmd=p --fields=+afmikKlnsSz --sort=no -f output.tags test.hpp
The problem is the current Zeus ignores this prototype information

But what you can do is downlaod the latest Exuberant Ctags source code (see link in an earlier post) and edit this ctags file: c.c
At about line 287 you will see this:
Code: Select all
{ FALSE, 'p', "prototype", "function prototypes"},
Code: Select all
{ FALSE, 'p', "function", "function prototypes"},

To fix this properly I will also make sure Zeus is changed to not ignore this prototype information.
Cheers Jussi
The latest Zeus patch found at the link below should fix the issues you have raised:
http://www.zeusedit.com/forum/viewtopic.php?t=770
But you will need to bind the new TagsCompleteEx keyboard function to the Ctrl+Space key combination
Cheers Jussi
http://www.zeusedit.com/forum/viewtopic.php?t=770
But you will need to bind the new TagsCompleteEx keyboard function to the Ctrl+Space key combination

Cheers Jussi