I can easily see the output of a command in a split using vim's terminal
For example, I use
:vertical terminal make re a lot.
This example is also stated in the help (
Or to run build command:
:term make myprogram
I even wrote a short function to easily launch shell commands in a vertical split:
command! -complete=shellcmd -nargs=+ Shell call s:RunShellCommand(<q-args>) function! s:RunShellCommand(cmdline) abort exe 'vert terminal '. a:cmdline endfunction
However, if the output is larger than the terminal width, new lines will be inserted. This makes the output inconsistent (it will depend on the current splits layout, window and screen size, and so on).
In this state, it's difficult to make use of vim's magic moves, copy, paste, diff, and so on.
Is there any way to get the command output without breaking lines?
I tried using
tw=0 with no luck.