On Tue, Mar 13, 2018 at 01:56:03PM +0100, Bram Moolenaar wrote:
> 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?

Personally I like the current behavior.

I use vim's :terminal to run a couple of web servers (a Python one for a
web app backend, and a Node.js one for the app's frontend).  These
autorestart when the source code on disk changes, but sometimes (e.g. when I
save a file during an unfinished refactoring) one of the servers
crashes.  I like being able to see the error and to restart the command
in the same terminal window, for which I use a little user-defined
command:

  command! TermRestart exec 'term ++curwin' expand("%")[1:]


Maybe an option would be better?  Then people to select which one they
prefer in their vimrc, and they wouldn't have to repeat their preference
on every :terminal command?

Marius Gedminas
-- 
/*
 * This function is about (re)setting the class of a held lock,
 * yet we're not actually holding any locks. Naughty user!
 */

-- 
-- 
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 http://www.vim.org/maillist.php

--- 
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 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: PGP signature

Raspunde prin e-mail lui