Something as light as buffer switching. So I can quickly jump there and back to check, for example, the output of the last !
-invoked command.
I know there is the :sh
command, but then you have to exit it to get back to Vim, so it is a bit heavy for the purpose.
I am also aware of http://vim.wikia.com/wiki/Display_output_of_shell_commands_in_new_window but I am not a huge fan of splits.
The terminal can be opened in various ways the most preferred way is by typing in :term from Vim. This will create a horizontal split from the current editor and split it into half. You can change the size of the split using the mouse according to your preference.
Mostly you'll use the terminal like any other terminal and just type in shell commands and so on. There's a few optional extras that will help you interact with the rest of Vim. Use ctrl-w N to switch to "terminal-normal mode", which will let you navigate around.
As :help :terminal says, you can always exit to normal mode using <Ctrl-\><Ctrl-N> ( :help CTRL-\_CTRL-N ). Use i to return to terminal interaction. Save this answer.
Try Ctrl-Z, also accessible from the built in command :suspend
. Does that do what you want?
If you do not mind not having scrolling, use
:!
(That is, run the !
Ex command without arguments.)
Otherwise, if you are running the terminal version of Vim,
use :suspend
or Ctrl+Z (the latter
keyboard shortcut works in Normal and Visual modes).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With