1

I want the behavior of :vnew term://make ts run-server but using the make command instead of invoking term. I have tried :make ts run-server | vert copen but that still takes over the entire terminal until it's finished, and then it opens a vertically split buffer, but I want it to open a vertically split buffer and have all the output in that new buffer only.

As for why I want this, 2 reasons: 1) I'm curious how to do it, and 2) using term doesn't give me the quickfix list.

EDIT: I want to do this without plugins. If this functionality isn't possible without a plugin, I will content myself with :vnew term://make ts run-server.

3
  • Related: How to capture errors from make in terminal window
    – Matt
    Commented Feb 20, 2020 at 15:51
  • @Matt You're right, that is very related. Looks like it isn't really possible :(
    – Jason
    Commented Feb 20, 2020 at 16:58
  • 1
    That's possible with the help of jobs API. But, in practice, that will result in some sort of lightweight re-implementation of the corresponding plugins (AsyncRun, vim-dispatch etc.).
    – Matt
    Commented Feb 20, 2020 at 17:45

1 Answer 1

3

Your first command was closer: :vnew makes a new vertical window. :vertical is the modifier that changes how other commands work:

:vertical terminal make ts run-server

Will get you the terminal. If you want that and the quickfix list, try tpope's Dispatch plugin:

:Dispatch make ts run-server
5
  • Thanks for the suggestions. Actually :vertical terminal make ts run-server is different from :vnew term://make ts run-server, and as such does not do what I want. I'd prefer not to use a plugin for this because I'm fairly certain this should be possible without a plugin. If it requires a plugin then I just won't do this at all.
    – Jason
    Commented Feb 20, 2020 at 16:07
  • @JasonFry the :vert terminal make is the way to go without a plugin, however your use of term:// makes it sound like you are using neovim, so the command might be a bit different there. Commented Feb 20, 2020 at 16:28
  • @ChristianBrabandt You're correct, I'm using neovim and :vertical terminal make ts run-server behaves differently from :vnew term://make ts run-server. Are you saying this isn't possible without invoking term? That's a bummer.
    – Jason
    Commented Feb 20, 2020 at 16:58
  • @JasonFry vert term simply doesn't work in Neovim. But that's not a problem, as you can always do vnew | term ... etc.
    – Matt
    Commented Feb 20, 2020 at 17:42
  • @JasonFry There are other ways, like capturing the output of system and put it in a new buffer or similar. But the built-in terminal is the most straight forward way. Commented Feb 21, 2020 at 6:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.