Christian Brabandt wrote:

> > > On So, 30 Jul 2017, Bram Moolenaar wrote:
> > > 
> > > > Patch 8.0.0813
> > > > Problem:    Cannot use Vim commands in a terminal window while the job 
> > > > is
> > > >             running.
> > > > Solution:   Implement Terminal Normal mode.
> > > > Files:      src/terminal.c, src/proto/terminal.pro, src/main.c, 
> > > > src/screen.c,
> > > >             src/normal.c, src/option.c, runtime/doc/terminal.txt
> > > 
> > > Thanks. Seems to work fine for my quick test.
> > > 
> > > Two things I noticed, not sure if either of them classifies as bug:
> > > 
> > >  *  CTRL-L does clear the last output. Not sure if this is intended or
> > >     not. I am okay with it, its just unexpected. Using <C-W>N<C-L> works 
> > >     okay.
> > 
> > What do you mean with "the last output"?  It's up to the job to handle
> > CTRL-L typed in the terminal window.  Bash would clear the window.
> 
> Yeah sorry, that is obviously correct. I just didn't expect it. I am 
> also using vi mode within the shell, however using it while running the 
> terminal is ... confusing.

Yes, you can run Vim, open a shell, run Vim in it, start a shell
window...

Perhaps we could give a shell window a bit of a background.  However,
when running Vim in it it would go back to normal?
 
> > >  *  Switching to terminal normal mode shifts the window, because the 
> > >     sign column is applied to it, while in terminal mode, it isn't 
> > >     shown. That gives a strange shifting effect. (Test with :set 
> > >     signcolumn=yes, press <C-W> N A)
> > 
> > I think this is to be expected.  We could show the signcolumn when the
> > job is active, but it would not contain anything.
> > 
> > You can also set 'foldcolumn' and even fold some lines.  Going out of
> > Terminal mode hides that.  So you can create a mess if you want to...
> 
> Same for `:set nu`. it certainly looks funny, how the output shifts, 
> once Terminal Normal mode is entered (and those additional columns are 
> added) and when Terminal input mode is entered (and those columns are 
> removed again).

I think we should use the principle that when the terminal is running
and under control of the job, we don't have any of the Vim stuff.  It's
a clear switch between two modes.  I believe neovim doesn't have that
and both neovim and the job are fighting over what's in the window, that is
even more confusing.  E.g. trying to select some text while the job
scrolls it up.  In Vim you now switch to Terminal mode, select the text
at your leasure, then give the terminal back to the job.  I even made it
possible to paste the yanked text now, with CTRL-W ".

-- 
Not too long ago, unzipping in public was illegal...

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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

Raspunde prin e-mail lui