Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

--wait should not auto-focus the next open window but return to where it was opened from #461

Closed
mtodd opened this issue Mar 28, 2013 · 10 comments

Comments

@mtodd
Copy link

mtodd commented Mar 28, 2013

My scenario to explain my problem:

I have Atom open editing. I commit changes and then --amend with EDITOR="atom --wait". When I close the COMMIT_MSG file to return to the terminal, it automatically focuses the next open Atom window instead of going back to the terminal.

Not sure if that's possible, but I was expecting to go back to the Terminal window I had open before to continue.

@benbalter
Copy link

👍 to this with a slight twist. Here's my workflow:

  • EDITOR is set to atom -w
  • git commit
  • Write my commit message
  • command-s
  • command-w

Expected:

With the only document now closed, pressing cmd-w a second time should close the Atom window, returning me to terminal (sublime's behavior).

Actual:

Cmd-w does nothing. Have to use cmd-q to close all Atom windows.

Unless I'm Doing It Wrong:tm:?

@mtodd
Copy link
Author

mtodd commented Aug 17, 2013

You can cmd+shift+w to close the current project window. It will select
the next open project window but you should then be able to switch back to
Terminal and carry on.

On Sat, Aug 17, 2013 at 10:35 AM, Ben Balter notifications@github.comwrote:

[image: 👍] to this with a slight twist. Here's my workflow:

  • EDITOR is set to atom -w
  • git commit
  • Write my commit message
  • command-s
  • command-w

Expected:

With the only document now closed, pressing cmd-w a second time should
close the Atom window, returning me to terminal (sublime's behavior).

Actual:

Cmd-w does nothing. Have to use cmd-q to close all Atom windows.

Unless I'm Doing It Wrong[image: ™️]?


Reply to this email directly or view it on GitHubhttps://github.com//issues/461#issuecomment-22816188
.

Matt Todd
GitHub, Inc
www.github.com
cell: 404-314-2612
blog: maraby.org

@benbalter
Copy link

🤘 thanks. Exactly what I needed.

@Dru89
Copy link

Dru89 commented Jan 14, 2015

👍

This seems to have been left open for a while, so I'm not sure if anyone's still looking at it. I got here through https://discuss.atom.io/t/atom-w-doesnt-behave-like-other-editors/13383/2

It seems to me like the best way to handle this would be the way that Sublime handles it:

  1. User types atom --wait foo.txt
  2. If a window already exists, open a new tab and load foo.txt. If no window exists yet, open a new window with a new tab and load foo.txt.
  3. When the user closes the tab (not the window), the --wait is over and can be relinquished back to the terminal. Ideally, the terminal would focus here, as well.

Is this the plan here, or what are people thinking specifically?

@mmindenhall
Copy link

Before switching to atom, I was using TextMate as my git editor (mate -w -l 1). It sounds like TextMate also behaves like Sublime -- i.e., returning the focus to the terminal that launched the editor in "wait" mode, regardless of whether other TextMate windows are open.

It would be really great to have atom work the same way, as I keep tripping on this in my habitual git workflow:

  1. Write some code
  2. commit from terminal with git commit, which launches atom --wait
  3. Type commit message and close window
  4. Type git push ... 💥 I'm typing in another atom window (possibly on another display) instead of the terminal

@joryhatton
Copy link

👍 to this. this is one of the reasons i'm still using sublime 😢

@carolineschnapp
Copy link

👍 very much needed

@dougshamoo
Copy link

bump, anything new on this one?

@stale
Copy link

stale bot commented Aug 29, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot closed this as completed Sep 12, 2017
@lock
Copy link

lock bot commented Mar 30, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked and limited conversation to collaborators Mar 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants