Christian wrote:

> On Di, 13 Mär 2018, Kazunobu Kuriyama wrote:
> > 2018-03-13 21:56 GMT+09:00 Bram Moolenaar <>:
> > 
> > 
> >     Currently the :terminal command keeps the window open after the job
> >     exists.  The idea is that you have a chance to see the job output, you
> >     might want to yank it.  Closing the window automatically might mean you
> >     loose that text, there is no way to get it back.
> > 
> >     However, in practice I find that I mostly want the window to close as
> >     soon as the job finishes.  So how about changing the default behavior?
> > 
> >     Currently:
> >             :terminal               requires "exit<CR>:q<CR>" to close
> >             :terminal ++close       requires "exit<CR>" to close
> > 
> >     With different default:
> >             :terminal               requires "exit<CR>" to close
> >             :terminal ++noclose     requires "exit<CR>:q<CR>" to close
> > 
> >     Good idea or bad idea?
> > 
> > 
> > In case the job finished in a way different from one's expectation,
> > he might feel sad seeing the window closed mercilessly and regret
> > not giving the noclose option when he opened the terminal. But if
> > the proposed change comes with a way to restore (part of) the
> > contents of the closed window, just like g<, that
> > would remind him that :smile is always with Vim.
> Perhaps keep the last &lines in a register somewhere available. Also, 
> perhaps it makes sense to only autoclose the terminal, if the command 
> finished with a zero exit status.

The question then is when the clean it up.  Perhaps the next terminal
that exits overwrites it, like the delete register?

There are actually cases where you would want to see the output only
when the exit status is zero, e.g. something like ":term find . pattern".
Or when you always want to see the output, e.g. ":term make".  That
would actually be very common.

Perhaps we should only change it for when there is no argument, when
starting the shell.  A shell exiting accidentally when there is
something you want to see is rare (same thing would happen in a real
terminal).  While quitting the shell would nearly always be followed by
closing the window.

hundred-and-one symptoms of being an internet addict:
6. You refuse to go to a vacation spot with no electricity and no phone lines.

 /// Bram Moolenaar -- --   \\\
///        sponsor Vim, vote for features -- \\\
\\\  an exciting new programming language --        ///
 \\\            help me help AIDS victims --    ///

You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit

You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Raspunde prin e-mail lui