Vim is the text editor that is the advanced version of the Vi text editor and also it includes the advanced features like the extensive plugin system, and search and replace options come with the Vim text editor.
Its package comes in the default repository of Debian 12 and this text editor is highly configurable and is used to create or make amendments to text files. Also, a huge number of programming languages are supported by the Vim text editor. Therefore, it is also known as the “Programmer editor” as it can be used for the IDE of many programming languages.
This blog explains the installation of Vim text editor on Debian 12 by various approaches following the outline:
- What are the Ways to Install Vim on Debian
- Method 1: Install Vim on Debian Using its Repository Package
- Method 2: Install Vim on Debian Using its FlatHub Package
- Method 3: Install Vim on Debian Using its Snap Package
- What are the Different Ways to Uninstall the Vim on Debian
Let’s start the post by exploring different ways to install Vim on Debian 12.
What are the Ways to Install Vim on Debian?
Vim text editor can be installed on Debian Linux from the default repository’s package of Debian, also, it can be installed from Snapcraft as well as from FlatHub.
All these methods are demonstrated with the complete guide in the next sections.
Method 1: Install Vim on Debian Using its Repository Package
The first recommended method to install the package on Debian 12 is by using its default repository with the next mentioned steps.
Step 1: Launch the Terminal
First open and run the terminal to execute the installation commands of Vim on Debian 12:
Step 2: Update the Packages
The second step includes the assurance that all the packages are up to date on Debian 12 by running the command:
$ sudo apt update
Step 3: Show the Vim
To validate the presence of the “Vim” in the default repository of Debian 12, execute the command:
$ sudo apt show vim
Step 4: Install Vim on Debian 12
Now install the Vim from the default repository’s package of Debian with the apt package manager as shown:
$ sudo apt install vim -y
Step 5: Confirm the Vim’s Installation
To confirm the installation of the Vim, display the installed version with the command:
$ vim --version
Method 2: Install Vim on Debian Using its FlatHub Package
Another method to install the Vim text editor on Debian is by downloading its package from FlatHub. To download the package, users must need the flatpak package to be installed on Debian 12.
Follow the instructions explained in the blog for the installation and usage of the flatpak package manager on Debian 12.
Run the command mentioned below for installing Vim on Debian 12 from the FlatHub:
$ flatpak install flathub org.vim.Vim
To run the installed package of Vim from FlatHub, execute the command:
$ flatpak run org.vim.Vim
Method 3: Install Vim on Debian Using its Snap Package
The next method to install Vim on Debian 12 is by using the snap package which is available on Snapcraft and can be installed on Debian 12 after downloading with the snapd command utility.
To understand the usage of the snap packages on Debian 12 and to install the snapd, it is suggested to go through the following article.
For instance, to install Vim from its snap, run the below-mentioned command:
$ sudo snap install vim-editor --beta
This “beta” version can crash sometimes because of the amendments that are going to make it a stable version.
What are the Different Ways to Uninstall the Vim on Debian?
If the Vim package is installed on Debian 12 using the apt package manager, then use its “purge” option. This option of the apt package manager will remove the package with its configuration files:
$ sudo apt purge vim -y
If the vim package is being installed using the flatpak package manager, then execute the command:
$ flatpak uninstall flathub org.vim.Vim
If the snap package is installed, then run the following command to remove it:
$ sudo snap remove vim-editor
Finally, remove all the unused dependency files with the command:
$ sudo apt autoremove -y
This is all about the installation of the Vim text editor on Debian 12.
To install the Vim text editor on Debian 12, start up the terminal and execute the command “sudo apt install vim -y”or use the FlatHub and the Snap packages. The installation of the Vim text editor has been explained in this post by all the mentioned methods.