Sublime Text plugin to open #include files in C/C++ source code.
Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
Default.sublime-keymap
Default.sublime-mousemap
GotoCppInclude.py
GotoCppInclude.sublime-settings
LICENSE
Main.sublime-menu
README.md

README.md

GotoCppInclude

Sublime Text plugin to open #include files in C/C++ source code.

Settings

goto_cpp_include_paths

The list of directories to search for header files in. The default value for this setting is not very useful. It only includes /usr/local/include and /usr/include. The include directories for your compiler should be listed either in your User settings file, or in your project file.

To find the include paths for your gcc compiler run the following command:

gcc -xc++ -E -v -

You should see output similar to the following:

#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.6
 /usr/include/c++/4.6/x86_64-linux-gnu
 /usr/include/c++/4.6/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.6/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.

GotoCppInclude will search each directory in order for the include file under the cursor(s). If the include statement uses quotation marks (e.g. #include "header.h") GotoCppInclude will first search the source file's directory, then each directory in goto_cpp_include_paths until the include file is found.

Key Mapping

By default GotoCppInclude is mapped to alt+d.

Mouse Mapping

By default GotoCppInclude is also mapped to ctrl+button3 (scroll button).

Installation

Copy the GotoCppInclude directory to your Packages directory.