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