Skip to content
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

:q[a] and :x[a] should quit project, :bd should close file #85

Open
lloeki opened this issue Jul 29, 2015 · 4 comments
Open

:q[a] and :x[a] should quit project, :bd should close file #85

lloeki opened this issue Jul 29, 2015 · 4 comments

Comments

@lloeki
Copy link
Owner

lloeki commented Jul 29, 2015

Watch out, there's some "file visited" state:

$ vim foo bar
:q
#<warns>
:q
#<quits>
$ vim foo bar
:qa
#<quits>
@jazzpi
Copy link
Collaborator

jazzpi commented Jul 30, 2015

I don't think the case with :q warning applies to Atom since you can't have multiple buffers in the same tab, which is why vim warns in that case.

@lloeki
Copy link
Owner Author

lloeki commented Jul 30, 2015

:q should close the Atom project window, not just the file tab. As such, if multiple files have been opened, we shouldn't quit unless they've all been visited or the user has been warned already. Scenario:

# quit Atom
$ touch foo bar baz
$ atom foo bar baz
:q

@jazzpi
Copy link
Collaborator

jazzpi commented Jul 30, 2015

So we're following the equivalents that @romgrk lined out in #48 (comment)? If that's the case, :q should only close the pane, not the project window, since :q in vim closes a vim-window, not the entire process (unless there is only one pane open).

@lloeki
Copy link
Owner Author

lloeki commented Jul 30, 2015

:q in vim closes a vim-window, not the entire process (unless there is only one pane open).

You're right.

So we're following the equivalents that @romgrk lined out in #48 (comment)

Not exactly, since vim and Atom disagree on the nesting order of splits and tabs. I think it's more important to maintain UI semantics rather than implementation hierarchy semantics. That's also why I'm still not completely sure :e should continue to replace the current tab in the long term: while distinct in implementation, tabs and buffers (a.k.a "open files") are inherently coupled in the Atom interaction model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants