Sublime Forum

Switch Header/Implementation

#1

I cannot get the command: Switch File -> Switch Header/Implementation to work at all on Mac build 2076. Neither the keyboard shortcut (on mac cmd + alt + up_arrow), nor selecting the command from the menu does anything at all.

I assume this works in the same way as Textmate, where, for example, if you have both header and implementation files open in tabs, and issue this command while one of those files is the active tab, it will switch to the other file.

Any suggestions on what might be the problem?
Thanks.

0 Likes

#2

The alternate file doesn’t have to be open, but it does have to be in the same directory as the current file, which I assume is the issue here.

FWIW the logic is in Packages/Default/switch_file.py

0 Likes

#3

Thanks for the quick reply. Yes that is indeed the issue, the other file is in another folder but in the same project.

0 Likes

#4

Sorry for my ignorance.

What exactly does this do?

0 Likes

#5

[quote=“jbrooksuk”]Sorry for my ignorance.

What exactly does this do?[/quote]

The command itself? In C or C++ for example, I have separate header and implementation files for all my classes, so if I am working on a class’ header and want to switch directly to its implementation file say, this command provides a quick way to do that, without having to find the specific tab in the menu bar, or hunt for in it the project drawer.

0 Likes

#6

:confused: I should have known that…

Thanks :smiley:

0 Likes