Sublime Text plugin providing code navigation and true intelligence for C and C++.
- Total 290
- Win 2
- OS X 285
- Linux 3
|Mar 24||Mar 23||Mar 22||Mar 21||Mar 20||Mar 19||Mar 18||Mar 17||Mar 16||Mar 15||Mar 14||Mar 13||Mar 12||Mar 11||Mar 10||Mar 9||Mar 8||Mar 7||Mar 6||Mar 5||Mar 4||Mar 3||Mar 2||Mar 1||Feb 28||Feb 27||Feb 26||Feb 25||Feb 24||Feb 23||Feb 22||Feb 21||Feb 20||Feb 19||Feb 18||Feb 17||Feb 16||Feb 15||Feb 14||Feb 13||Feb 12||Feb 11||Feb 10||Feb 9||Feb 8|
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 firstname.lastname@example.org: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.