Zeus C/C++ Auto-complete Using Clang

Find Tips and tricks on how to better use the Zeus IDE. Feel free to post your own tips but please do not post bug reports, feature requests or questions here.
Post Reply
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Zeus C/C++ Auto-complete Using Clang

Post by jussij »

The latest Zeus release adds C/C++ autocomplete, code navigation and code reformatting by using Clang.

The latest release can be found here: http://www.zeusedit.com/download.html

Auto-completion
Consider this example of code:

Code: Select all

class Person {
public:
    const int   age()  { return 26; }
    const char *fist() { return "John"; }
    const char *last() { return "Smith"; }
}

void Test() {
    Person person;
    person.|
}
With an autocomplete trigger at the cursor location show will result in the auto-completion shown below:
clang_complete.png
clang_complete.png (7.09 KiB) Viewed 27147 times
Code Formatting
This version also includes a macro that will re-format a marked region of code using the clang-format utility.

As an example consider code that looks like this:

Code: Select all

class Person {
  public:
      const int     age()  { 
        return 26; }
      const char *fist()
      {
        return "John"; }
        const char *last() {
            return "Smith"; }
}
By marking that region of code and running the macro will result in that code being reformatted as shown below:

Code: Select all

class Person {
public:
    const int age() { return 26; }
    const char *fist() { return "John"; }
    const char *last() { return "Smith"; }
}
Code Navigation
This version also includes a macro that provides Clang driven code navigation.

Cheers Jussi
Post Reply