dschwen / switch-header-source

Quick switching between C/C++ header and source files
MIT License
13 stars 49 forks source link

Possible option for loading corresponding files #8

Closed eboracus closed 8 years ago

eboracus commented 9 years ago

Very nice package. Would it be feasible to include an option (in the package settings maybe) to enable loading a corresponding header or source file if you don't already have it open, still using the same keybinding. So a process along the lines of: key press --> check if file is currently open --> (if yes) switch --> (if no and it can be found either in present directory or in a closely neighbouring/aptly named one) load it and make current. If it can't be found close by then do nothing.

dschwen commented 9 years ago

The plugin already does exactly that.

eboracus commented 9 years ago

Aha, awesome! So it does. :+1: I think I may have been the victim of a poorly timed lag spike, as I clicked to manually load the same file when it seemed nothing occurred (mid-delay), making me think it was the click and not the key press that did the opening. An object lesson in patience with key-binding presses.

Just tried again anyway and it worked perfectly. Apologies for coming in and effectively just describing the plugin! :)

acampove commented 8 years ago

Hi,

I have my definitions (.cxx) in a ./src directory and my headers in an ./include directory, but I seem to be unable to switch from header to source using that package, is that possible? It seems to work only if they both are in the same directory.

Thanks.

dschwen commented 8 years ago

This issue should have been closed a while ago. I see you opened #9. Let's see if you found a bug and discuss over there.

acampove commented 8 years ago

Yes, sorry, I did not notice I had to open a new issue :)