Recently i came to know about one very Good features of vim which make my life easy in many way while editing and working on Linux terminals in which we need to see some file content and also need to work accordingly on terminal same time. So in this post we will see How to Open Terminal inside VIM.

Use Case

Imagine you are working on some file and while working on it you have work on linux terminal side by side like copy paste some commands from that file to terminal. In this case we might need to open another terminal side by side or need to work on screen to create vertical split which has features to open two screen windows side by side.

Vim Support

Let me inform what vim version i am using for creating this post. I am using Ubuntu 18.04.3 LTS with below vim version.

If your vim version having terminal support, you could see below command with provided output.

ssirohi@jarvis:~$ vim --version | grep -o .terminal

+terminal is comes out if have terminal features enable otherwise will get -terminal.

How To Open vim Terminal

In Vim editor we could open terminal with below commands.

:terminal or :ter -- Open Horizontal Split terminal

:vert term or :vertical terminal -- Open vertical terminal 

This way we could able to open terminal like below in vim editor.

Once we come out of these terminal, all of your output could save in file (on mentioned provided path).