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

Close Window on :wq if only one pane

Open mainderay opened this issue 9 years ago • 3 comments

Have my global core.editor in Git set to:

"atom --wait"

So it can be used for commit messages. When using Sublime, it opens a new window (as does Atom) and when I use the :wq command it closes that Sublime window after saving. Atom/Ex-mode closes the pane, not the window. Would it make sense for :wq to close the window if there is only the one pane?

mainderay avatar Dec 11 '15 17:12 mainderay

This seems pretty related to #85.

mainderay avatar Dec 11 '15 17:12 mainderay

You might want to install the close-after-last-tab package. This will also close the window when you close all tabs by pressing Ctrl-WQ or clicking on the close tab button.

I don't think it would be a good idea to have different behaviors when closing tabs using different methods.

jazzpi avatar Dec 11 '15 22:12 jazzpi

@mainderay very related. As it exists currently, the usage of :q in ex-mode already contradicts vim's implementation of :q, which is to simply alias :quit, which quits the vim application. In ex-mode, rather than quitting Atom, :q closes a single file. In #85, it's noted that the concept of vim's buffers are largely unavailable as it stands, where the :bd/:bdelete (buffer delete) command deletes the currently viewed buffer (e.g. purges the file's contents from memory) leaving the empty tab to remain open. I suppose this comes down to a question of preference and development roadmap. It was a concept I originally found irritating in vim, but ultimately came to love and adore. Was slightly confused to find it missing in ex-mode.

webavant avatar Apr 16 '16 08:04 webavant