Re-focus Sublime after running tests#22
Open
jimrubenstein wants to merge 1 commit intoadamwathan:masterfrom
Open
Re-focus Sublime after running tests#22jimrubenstein wants to merge 1 commit intoadamwathan:masterfrom
jimrubenstein wants to merge 1 commit intoadamwathan:masterfrom
Conversation
…executing the test suite finishes.
ed92506 to
913fffc
Compare
|
I did similar to this but instead of tabbing over I used the following: tell application "System Events" to tell process "Sublime Text"
set frontmost to true
end tellSeems to work but not sure if it is the best method either. |
Contributor
Author
|
I was messing with this method, or one like it, as well, but instead of
coming into focus, sublime would just hang...so I tried the tab method.
Might've had something to do with the process I was running the command in,
not sure.
I wish I could make this more intelligent though, to say, detect when
sublime is overlapping the terminal and not re-focus then? Idk just a
random thought I had when I was running some tests one day..haha
…On Aug 1, 2017 1:18 PM, "Ryan Eby" ***@***.***> wrote:
I did similar to this but instead of tabbing over I used the following:
tell application "System Events" to tell process "Sublime Text"
set frontmost to trueend tell
Seems to work but not sure if it is the best method either.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALajxcuTO0rja3_1P-nkOuBmES1G-HNks5sT13rgaJpZM4NDm-_>
.
|
|
I had the hang issue if I followed any of the suggestions of activate or window index but the frontmost seems to work without a hang, at least on my setup. |
bakerkretzmar
added a commit
to bakerkretzmar/sublime-phpunit
that referenced
this pull request
Jul 4, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As I mentioned in #21, I often forget to restore focus to Sublime after running my tests.
This enhancement adds 2 new options (and supporting readme material) for automatically restoring focus to Sublime after tests are run.
By default, autofocus is off. I expect it's fine for most people. But when I have my terminal on one screen and Sublime in the other, it's super handy to have focus automatically be restored. I rarely ever need to type more terminal commands after my test suite starts.