:terminal mode ques

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

:terminal mode ques

M Kelly
Hi,

I am using :terminal and it is great!, thank you.
I have two questions if anyone can help -

1). is there a way to get vim to exit if the only buffer was a terminal in the current window and that job ends ?

2). is there a way to start several :terminal windows but have them hidden and then how would I switch from one to the other ?  (ie I don't want tiled windows but just one and switch between them with a shortcut key)

thanks for any insight,
-mark

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: :terminal mode ques

M Kelly
> 1). is there a way to get vim to exit if the only buffer was a terminal in the current window and that job ends ?

Perhaps something related to autocmd BufLeave ... to close/end vim ??

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: :terminal mode ques

M Kelly
In reply to this post by M Kelly
Hi again,

Also I cannot seem to select any text with the mouse in terminal mode.
I understand I cannot edit the terminal buffer but I do still want to cut/paste from the mouse to the command line from time to time.
Anyone know of a way to make this work ?

thanks again as always to everyone for their work and help,
-mark

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: :terminal mode ques

Alessandro Antonello
Off course you can. Type CTRL+\ CTRL+N and the terminal buffer will become a regular buffer without ending the job. Then you can yank, mark or do whatever you need.

To go back to Terminal mode just type A.

Em 28 de dez de 2017 14:54, "M Kelly" <[hidden email]> escreveu:
Hi again,

Also I cannot seem to select any text with the mouse in terminal mode.
I understand I cannot edit the terminal buffer but I do still want to cut/paste from the mouse to the command line from time to time.
Anyone know of a way to make this work ?

thanks again as always to everyone for their work and help,
-mark

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: :terminal mode ques

M Kelly
> Off course you can. Type CTRL+\ CTRL+N and the terminal buffer will become a regular buffer without ending the job. Then you can yank, mark or do whatever you need.
>
>
> To go back to Terminal mode just type A.

ok, yes, but this is more effort than before.  In more detail, if I am in a non-vim shell I can type cd then click on a dir with the mouse and click again to paste and its there.  In vim terminal mode I would like to do the same, if it is at all possible I am not sure.  In a vim terminal I can type cd then c-\ c-n then hold the mouse and drag across the dir then type i/a then paste but it would be really awesome if I could use typical shell/term mouse events when in vim terminal mode.

thx

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: :terminal mode ques

M Kelly
> > Off course you can. Type CTRL+\ CTRL+N and the terminal buffer will become a regular buffer without ending the job. Then you can yank, mark or do whatever you need.
> >
> >
> > To go back to Terminal mode just type A.
>
> ok, yes, but this is more effort than before.  In more detail, if I am in a non-vim shell I can type cd then click on a dir with the mouse and click again to paste and its there.  In vim terminal mode I would like to do the same, if it is at all possible I am not sure.  In a vim terminal I can type cd then c-\ c-n then hold the mouse and drag across the dir then type i/a then paste but it would be really awesome if I could use typical shell/term mouse events when in vim terminal mode.

Maybe go into visual mode (ie c-\ c-n) with a mouse click and then go back to terminal mode with another click ??


--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: :terminal mode ques

Nikolay Aleksandrovich Pavlov
2017-12-29 17:30 GMT+03:00 M Kelly <[hidden email]>:
>> > Off course you can. Type CTRL+\ CTRL+N and the terminal buffer will become a regular buffer without ending the job. Then you can yank, mark or do whatever you need.
>> >
>> >
>> > To go back to Terminal mode just type A.
>>
>> ok, yes, but this is more effort than before.  In more detail, if I am in a non-vim shell I can type cd then click on a dir with the mouse and click again to paste and its there.  In vim terminal mode I would like to do the same, if it is at all possible I am not sure.  In a vim terminal I can type cd then c-\ c-n then hold the mouse and drag across the dir then type i/a then paste but it would be really awesome if I could use typical shell/term mouse events when in vim terminal mode.
>
> Maybe go into visual mode (ie c-\ c-n) with a mouse click and then go back to terminal mode with another click ??

<C-\><C-n> goes to normal mode, not visual. And you should be able to
use :tnoremap to remap mouse clicks as well, though I have not tested
that. There are some examples for other modes in `:h mouse-using`.

>
>
> --
> --
> You received this message from the "vim_use" 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_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: :terminal mode ques

Bram Moolenaar

Nikolay Pavlov wrote:

> 2017-12-29 17:30 GMT+03:00 M Kelly <[hidden email]>:
> >> > Off course you can. Type CTRL+\ CTRL+N and the terminal buffer will become a regular buffer without ending the job. Then you can yank, mark or do whatever you need.
> >> >
> >> >
> >> > To go back to Terminal mode just type A.
> >>
> >> ok, yes, but this is more effort than before.  In more detail, if I am in a non-vim shell I can type cd then click on a dir with the mouse and click again to paste and its there.  In vim terminal mode I would like to do the same, if it is at all possible I am not sure.  In a vim terminal I can type cd then c-\ c-n then hold the mouse and drag across the dir then type i/a then paste but it would be really awesome if I could use typical shell/term mouse events when in vim terminal mode.
> >
> > Maybe go into visual mode (ie c-\ c-n) with a mouse click and then go back to terminal mode with another click ??
>
> <C-\><C-n> goes to normal mode, not visual. And you should be able to
> use :tnoremap to remap mouse clicks as well, though I have not tested
> that. There are some examples for other modes in `:h mouse-using`.

We should be able to detect whether libvterm is passing mouse events to the
job.  If not, then we can use Vim modeless selection.

--
If Microsoft would build a car...
... You'd have to press the "Start" button to turn the engine off.

 /// Bram Moolenaar -- [hidden email] -- 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_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.