ex-mode icon indicating copy to clipboard operation
ex-mode copied to clipboard

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

Open lloeki opened this issue 10 years ago • 4 comments

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

$ vim foo bar
:q
#<warns>
:q
#<quits>
$ vim foo bar
:qa
#<quits>

lloeki avatar Jul 29 '15 19:07 lloeki

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.

jazzpi avatar Jul 30 '15 07:07 jazzpi

: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

lloeki avatar Jul 30 '15 08:07 lloeki

So we're following the equivalents that @romgrk lined out in https://github.com/lloeki/ex-mode/pull/48#issuecomment-106864601? 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).

jazzpi avatar Jul 30 '15 08:07 jazzpi

: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.

lloeki avatar Jul 30 '15 09:07 lloeki