Sublime Forum

Switch Header/Implementation with C++ headers

#1

Hi there. I’m a TextMate user giving Sublime Text 2 a shot.

My code base uses .hh as the extension for C++ headers.

The “switch header/implementation” seems to expect headers to be named “.h”

Is there a way to configure this?

Thanks,
Jake

0 Likes

#2

According to the Main.sublime-menu file, this is how the command is run:

{ "command": "switch_file", "args": {"extensions": "cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]}

You could try adding “hh” to the extensions.

0 Likes

#3

Thanks. That did it. Also, need to edit the key binding as well similarly. Works like a charm.

0 Likes

#4

hi there, what if the c++ header file with no file extension then how to configure the switch_file args ?
the header do have the `c++’ symbol in the very first line.

0 Likes