If I have a vim session with two splits, when I execute a
:! command, the result is shown in the entire window. Is it possible to have the output shown just on the active split?
You can make a command to do just this:
- Open a new split (or tab)
- Run a command and show the results in that split (or tab)
The command would be something like this:
.vimrc you can write this:
" execute a command and show its output in a split window command! -nargs=* -complete=shellcmd Rsplit execute "new | r! <args>" " execute a command and show its output in a new tab command! -nargs=* -complete=shellcmd Rtab execute "tabnew | r! <args>"
You can find how to make your own commands with
That won't be possible. You'll have to split your screen with another tool like tmux (IIRC), screen, ...
If you don't need to interact with the program executed, you can however import its results directly in any window (in the vim sense
:h windows) you wish with