Page 1 of 1

Zeus C/C++ Auto-complete Using Clang

Posted: Sun Nov 29, 2015 1:33 am
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 27151 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