Sublime Text plugin providing code navigation and true intelligence for C and C++.
- Total 280
- Win 2
- OS X 275
- Linux 3
|Nov 18||Nov 17||Nov 16||Nov 15||Nov 14||Nov 13||Nov 12||Nov 11||Nov 10||Nov 9||Nov 8||Nov 7||Nov 6||Nov 5||Nov 4||Nov 3||Nov 2||Nov 1||Oct 31||Oct 30||Oct 29||Oct 28||Oct 27||Oct 26||Oct 25||Oct 24||Oct 23||Oct 22||Oct 21||Oct 20||Oct 19||Oct 18||Oct 17||Oct 16||Oct 15||Oct 14||Oct 13||Oct 12||Oct 11||Oct 10||Oct 9||Oct 8||Oct 7||Oct 6||Oct 5|
Ceer is a C and C++ plugin for Sublime Text that provides code intelligence across source files by continuously parsing and indexing a project. Because Ceer is actually starting to compiling the code, but stopping before code generation, it reflects the true state and structure of the program.
Ceer is in an early prototype phase, and we are working hard to improve stability, scalability, and portability. Currently, Ceer is only available on OSX, support for other major platforms is in the works. I haven't developed a good framework for testing yet, so any feedback is greatly appreciated!
Table of Contents
Right clicking any reference to a method, field, class, etc. and selecting the Open Definition command will jump to the definition of that reference, even if it is defined in another source file. Note that in C or C++ a definition is not the same as a declaration. A declaration must be present in each file where there is a reference, while there must only be a single definition across all source files.
main.cpp file contains a call to
some_method, which is declared in
main.cpp by including
Foo.h, and defined in
Right click with the cursor anywhere in on
some_method to call Open Definition.
Open Definition will open
Foo.cpp and highlight the
The List References command can be called on any definition or reference, and will list all references in a menu. Highlighting a reference will navigate to its location in the project.
Call List References on
some_method. Note that calling List References on any reference to
some_method would be the same.
The first reference found is in
main.cpp. Here we can see that Ceer is able to infer the compile-time type of the expression
((Baz*)&myFoo). In fact, it should be able to perform type inference identical to a compiler for any valid expression.
The second reference found is in
The Expand Superclasses command can be called on any definition or reference for a C++ class, and displays inheritance hierarchy of the class in a menu.
Call Expand Superclasses on
Foo. As with List References, we could also call Expand Superclasses on a reference to
Foo inherits from
Base, which doesn't inherit from any other class.
Baz has a more interesting inheritance structure.
Baz inherits directly from both
Bar, both of which inherit from
Base. Note that in the menu, the superclasses are displayed in breath first search order, and are indented by their level in the inheritance hierarchy.
Naturally, the Expand Subclasses command behaves the same as the Expand Superclasses command, but displays classes that inherit from the selected class.
Call Expand Subclasses on
This diagram looks similar to when we called Expand Superclasses on
Baz, but is reversed, because we are looking from the top of the inheritance hierarchy down, instead of from the bottom up.
Right clicking anywhere in a file and selecting the Expand Includes command will show all the files that file is including, whether directly or indirectly. The includes are ordered by depth first search, and indented based on how indirect the inclusion is.
Call Expand Include on
Bar.h, which both include
Base.h. Note that
Base.h is indented because it is not directly included in
The List Includers displays a menu of all the files that are including the file the command is called on. Similarly to the Expand Includes command, the files are ordered by depth first search, and indented based on indirectness.
Call List Includers on
main.cpp all directly include
Baz.cpp indirectly includes
Foo.h, because it includes
enable_diagnostics option is set to
true in the
.sublime-project file, Ceer will display the same errors and warnings as the compiler. Moving the cursor to anywhere in the diagnostic will display a summary in the Sublime status bar at the bottom of the window. A list of all commands in the project or a single file can be viewed in a menu using the View Issues in Project or View Issues in File commands, respectively.
a_private_field is declared to be
Foo.h. Attempting to access it in
Baz results in the error
'a_private_field' is a private member of 'Foo'.
Calling the View Issues in Project command or calling the View Issues in File command on
Baz.h displays the error in a menu.
Selecting an error in the menu will jump to the error.
Currently Ceer is in a prototype phase, and is only available for OSX. Support for other platforms is planned.
Ceer is available in Package Control.
Currently, the only way to install is by directly cloning the Ceer repo into
~/Library/Application Support/Sublime Text 3/Packages:
$ cd ~/Library/Application Support/Sublime Text 3/Packages $ git clone email@example.com:andylamb/Ceer.git
$ cd ~/Library/Application Support/Sublime Text 3/Packages $ git clone https://github.com/andylamb/Ceer.git
- Create a
.sublime-projectfile, using 'Project > Save Project As…'
- Right click anywhere in the Side Bar and select Build Index.
Ceer requires a
.sublime-project file in order to know which files to parse and index. To create a
.sublime-project file, go to 'Project > Save Project As…'
In order to produce the most faithful representation of the source code, Ceer can parse a
Makefile and use the same compilation commands. To enable this feature, in the
.sublime-project file , under the
ceer section, set either
makefile_path. Note that the 'ceer' section is created automatically on the first call to Build Index
Diagnostics can be controlled using
diagnostics_enabled in the
ceer section of the
Ceer is currently in a prototype phase, and we are working hard to improve stability, scalability, and portability. Issues and Pull Requests are greatly appreciated! Please read over the Contribution Guidelines to get started.