Detaching and reattaching terminals from Vim

38 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Jun 5, 2019, 2:58:20 PM6/5/19
to vim_dev
Hi all,

Based on the discussion threads in Vim reddit, it looks like users are trying
to use the Vim terminal support as a replacement for screen/tmux.
One of the key features that is currently missing in Vim is the ability
to detach and reattach terminals. I think, this will be a useful feature
to add.

- Yegappan

Andy Massimino

unread,
Jul 19, 2019, 11:19:05 AM7/19/19
to vim...@googlegroups.com
Do you mean detaching vim from the parent terminal or detaching vim's
inner :terminal(s)?  There is a small C program
https://github.com/crigler/dtach which handles only the detach feature
of screen/tmux (at least for some subset of linux terminals).  Plausibly
it could be embedded right into vim though I'm not sure if that's
appropriate.


Bram Moolenaar

unread,
Jul 19, 2019, 3:27:39 PM7/19/19
to vim...@googlegroups.com, Andy Massimino
Why not simply use:
:term tmux

and
:term tmux attach


--
If you only have a hammer, you tend to see every problem as a nail.
If you only have MS-Windows, you tend to solve every problem by rebooting.

/// Bram Moolenaar -- Br...@Moolenaar.net -- 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 ///

Yegappan Lakshmanan

unread,
Jul 21, 2019, 12:12:43 PM7/21/19
to vim_dev, Andy Massimino
Hi Bram,

On Fri, Jul 19, 2019 at 12:27 PM Bram Moolenaar <Br...@moolenaar.net> wrote:
>
>
> > On 6/5/19 2:58 PM, Yegappan Lakshmanan wrote:
> > > Hi all,
> > >
> > > Based on the discussion threads in Vim reddit, it looks like users are trying
> > > to use the Vim terminal support as a replacement for screen/tmux.
> > > One of the key features that is currently missing in Vim is the ability
> > > to detach and reattach terminals. I think, this will be a useful feature
> > > to add.
> > >
> > > - Yegappan
> > >
> > Do you mean detaching vim from the parent terminal or detaching vim's
> > inner :terminal(s)? There is a small C program
> > https://github.com/crigler/dtach which handles only the detach feature
> > of screen/tmux (at least for some subset of linux terminals). Plausibly
> > it could be embedded right into vim though I'm not sure if that's
> > appropriate.
>
> Why not simply use:
> :term tmux
>
> and
> :term tmux attach
>

Vim has many of the terminal functionality found in tmux, so it can be
used without tmux. One of the key functionality missing currently is
detaching the terminal and reattaching it later.

Regards,
Yegappan
Reply all
Reply to author
Forward
0 new messages