dcarral / atom-ruby-test-switcher

Atom package to switch between Ruby source code and test files
https://atom.io/packages/ruby-test-switcher
MIT License
13 stars 1 forks source link

switching using tabbed mode, when not having double panes #1

Closed bo-oz closed 8 years ago

bo-oz commented 9 years ago

I don't know if this is really an issue... but when I'm trying to switch to the test from my code using Ctrl + Cmd + . when viewing a single pane (as I'm usually doing), the test isn't opened in the other (new) pane, but in the same pane as a tab.

dcarral commented 8 years ago

It's an issue, it looks like something broke that key binding :( Can't take a look until weekend arrives though. Thanks for the heads up!

bo-oz commented 8 years ago

Thanks for taking a look. Great package though!

bronson commented 8 years ago

I found the same thing... If I already have two panes open, AND my primary file is active in the left-hand pane, then ruby-test-switcher:switch correctly opens the test in the right-hand pane.

However, if the test is already in the left-hand pane, or there's only a single pane open, then the test is just opened in in the same pane.

Took a bit of time to figure out. Now that I know to keep my primary files in the left-hand pane, and to always keep a second pane open, it seems to work pretty well.

dcarral commented 8 years ago

@bo-oz Sorry for the delay getting back to you. Are you still experiencing the same issue? I've just re-tested it in both Windows and Mac OS X and looks fine. Still same default keybindings, so don't know what could be producing it. Perhaps a conflict with another package? Using Atom's keybinding resolver might come handy in that case.

dcarral commented 8 years ago

@bronson What you describe is the expected behavior, since I directly implemented the switching according to my workflow:

1) Source code to the left pane & test code to the right pane. 2) Switch to already opened (if any) source/test file, so I can bypass the default left/right locations.

This means: even if there are 2 opened panes, when the command is triggered from a source file located in the right pane, test file should be opened in the same pane.

Is this something that disturbs you / doesn't fit within your usual workflow? We could set the default pane locations as a configurable setting if that helps mitigating the issue.

Anyways, we should explicitly document it in the README file. Thanks for the heads up ;)

bronson commented 8 years ago

Well, it's surprising behavior when "open in new pane" doesn't actually do that. I suppose you could change the command to be switch-as-long-as-current-file-is-primary-and-in-left-hand-pane :)

I like my tools small and sharp. I don't really want them imposing their workflow upon me... Then they require long READMEs and end up feeling like an IDE.

Thanks for the explanation!

dcarral commented 8 years ago

Thank you for your feedback and feel free to contribute. Both Atom and this package would benefit from further contributions.