Open In App

How to Install Gvim on Ubuntu

Last Updated : 19 Apr, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

The text editor known as Vim, which stands for “Vi Improved,” is a traditional one that is primarily used by programmers. It is commonly referred to as a “programmer’s editor.” It was created a long time ago, but it is still a well-liked editor that outperforms many rivals. It can be used for everything from managing configuration files to basic text editing tasks. Major operating systems including Mac, Windows, Linux, and Unix all support Vim. Both GUI and non-GUI console modes are supported by Vim. For the GUI version of Vim, for instance, you can install MacVim on a Mac. Similarly, you can use the “gvim” executable installer on Windows. Gvim, a graphical version of Vim, is also available for Linux. Gvim is a powerful GUI editor that runs on Linux, much like other “vi” clones. 

What is Vi?

The visual editor is called the vi editor. Each and every Unix system has it installed. In other words, it can be found in every Linux distribution. It is user-friendly and functions identically across all platforms and distributions. It is an extremely strong application. Vim is an upgraded version of the vi editor.

Two modes exist in the vi editor:

  • Command Mode: In command mode, the file is affected by activities. In command mode, the vi editor launches. The words you type here will function as commands in the vi editor. You must be in command mode in order to pass a command.
  • Insert Mode: Text submitted in the insert mode will be inserted into the document. You can exit the insert mode and enter command mode by pressing the Esc key. 

What is Vim?

The Linux, BSD, and macOS operating systems all come with Vim, a Unix text editor. Its reputation for speed and effectiveness is partly due to the fact that it is a simple application that can run in a terminal (although it also has a graphical user interface), but primarily because it can be operated exclusively with the keyboard without the use of a mouse or menus. For instance, you can type and press I to add text to a file. You press Esc on your keyboard and then the key or key combinations that correspond to the action you want to conduct to navigate or give a command (such as Save, Backspace, Home, End, and so on). 

Install Gvim on Ubuntu

We can install Gvim on Ubuntu using 2 different methods:

  • Method 1: Installing using Ubuntu Software Center
  • Method 2: Installing using Terminal 

Let’s explore both installation methods one by one.

Method 1: Installing using Ubuntu Software Center

Follow the below steps to install the Gvim editor on Ubuntu operating system:

Step 1: Open the Software Center from the Activities Panel.

In the below screenshot, we can see that the Ubuntu Software is been displayed, we can install various applications for free from this application in Ubuntu OS.

 

Step 2: Search for the Gvim Editor in the Search box.

We have searched for the Gvim Editor application in the Search Box. We can see that the icon of the application is been displayed. After selecting this, we can install the application.

 

Step 3: Click on the Install button for installing the application

We have clicked on the install option to get the application on our local machine for usage.

 

Step 4: Search for Gvim in the Activities Panel

For launching the application, we have to navigate to the Activities Panel and search for the application.

 

Step 5: Click on the Icon to open the Application.

After clicking on the application icon, the application is opened and we can use it for file creation and many for file operations.

 

Method 2: Installing using Terminal 

Step 1: Update the repositories using the below command:

sudo apt-get update

We are updating the repositories using the apt manager.

 

Step 2: Install the Gvim editor using the below command:

sudo apt install vim-gtk3

In the below screenshot, we are installing the vim application using the apt package manager.

 

Enter “Y” when prompted to complete the installation.

 

Step 3: Launch the Gvim application using the below command:

givm

We have launched the application from the same terminal itself. 

 

Using Gvim

Step 1: Execute the below command to open the “gfg.txt” file in the Gvim editor:

gvim gfg.txt

We are creating a gfg.txt file using the Gvim application. 

 

Step 2: Enter the contents of whatever you want.

We have entered the contents in the file, all the changes will be done in the gfg.txt file.

 

Step 3: To view the contents of the file in the terminal, execute the below command in the terminal.

cat gfg.txt

To view the contents of the file, we have used the cat command. 

 

Conclusion:

This article taught us how to set up Gvim on Ubuntu, Despite the fact that Gvim is a graphical version, many new Linux users particularly those switching from Windows will find it to be more practical. There are negative aspects to this, though. The reason is that if your server is running in console mode, you cannot utilize Gvim. Additionally, you cannot use Gvim on a remote machine that you are managing with restricted access. As a result, we advise you to become familiar with Vim’s non-GUI interface.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads