Skip to content

start_sublime_text helper #180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rchl opened this issue Apr 21, 2020 · 6 comments
Closed

start_sublime_text helper #180

rchl opened this issue Apr 21, 2020 · 6 comments

Comments

@rchl
Copy link
Member

rchl commented Apr 21, 2020

There is this start_sublime_text that starts sublime:

subprocess.Popen("subl &", shell=True)

  1. Why does it use &? I understand that this means "run command in the background" but is it really relevant here? It seems to work just fine.
  2. On opening, a /tmp/ file is opened in a tab. Can this be avoided? I don't exactly see the point of it. I guess this is something related to subprocess but I don't exactly understand why it happens.
  3. I think this could be improved by passing --stay argument as otherwise, once the tab this command opens is closed, focus switches back to the terminal which can (and does) affect some focus specific tests
@randy3k
Copy link
Member

randy3k commented Apr 21, 2020

  1. It was the original comment for the &. I don't know if it is still needed.
        # In some Linux/macOS CI environments, starting ST simply with `subl`
        # causes the CI process to time out. Using `subl &` seems to solve
        # this.
  1. I remember that there was a problem of subl and I vaguely recall that it has been fixed in Sublime Text 4.
  2. @rwols is actually working on a refactoring, perhaps you could give your 2 cents there: WIP: Asyncio in run tests script #179

@rchl
Copy link
Member Author

rchl commented Apr 21, 2020

  1. That seems to happen only when using & in the command so removing it would solve both 1 and 2.
    But then I suppose we can't do much if we don't know a specific reason why it's here.

@rchl
Copy link
Member Author

rchl commented Apr 21, 2020

@FichteFoll made a comment on Discord that makes it clear:

note that ST3's subl used to stick around if it there was no existing sublime process running already. the behavior of always starting and communicating with a background process is new in ST4 afaict

And indeed it blocks if ST3 is not yet started

@rchl
Copy link
Member Author

rchl commented Apr 21, 2020

@rwols would you like to handle 3) on your branch or separately? I think --stay should actually help with LSP tests so it would be perfect if we could get that change separately ASAP.

@rwols
Copy link
Contributor

rwols commented Apr 21, 2020

Well, my PR is somewhat larger than that change.
I think it's best if it were a separate PR, my PR might take a while as I have to modify Windows, macOS and docker dependent files.

@randy3k
Copy link
Member

randy3k commented Apr 21, 2020

#181 has closed it.

@randy3k randy3k closed this as completed Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants