How to install Vim Text Editor on Fedora 35

In this guide we are going to learn how to install vim text editor on fedora 35.

Vim text editor is a free and open source screen based text editor program for Unix. It is highly configurable that make it easy to use and adapt to different programming languages. It also integrates well with other tools. It supports extensive plugin systems.

Vim supports extensive community, that is why vim keep evolving. The recent updates for vim includes:

  • Introduction of vimcrypt2 extension which will encrypt/decrypt files when written and read by vim. You enter password once for the same buffer and you can restore cursor on writing.
  • Introduction of GitBlame plugin which provides minimal command set for working with git
  • Introduction of todo list, it provides syntax coloring for simple todo files.
  • Introduction of tabpages which can load multiple files in tabs upon startup.

Prerequisites

  • Fedora 35 workstation
  • Access to internet
  • Basic familiarity to command line

Installing Vim (vi) on Fedora

First we need to run sudo dnf update -y to update our repository.

$ sudo dnf update -y

On fedora vi-minimal come preinstalled, this vi comes without syntax highlighting. For us to get enhanced features such as syntax highlighting, interpreters for all languages, we need to use vim-enhanced. To check the information about vim-enhanced we can run the following command on our terminal.

$ sudo dnf info vim-enhanced 

Sample Output.

# sudo dnf info vim-enhanced 
DigitalOcean Droplet Agent                                                        65 kB/s | 3.3 kB     00:00    
Available Packages
Name         : vim-enhanced
Epoch        : 2
Version      : 8.2.3512
Release      : 1.fc34
Architecture : x86_64
Size         : 1.8 M
Source       : vim-8.2.3512-1.fc34.src.rpm
Repository   : updates
Summary      : A version of the VIM editor which includes recent enhancements
URL          : http://www.vim.org/
License      : Vim and MIT
Description  : VIM (VIsual editor iMproved) is an updated and improved version of the
             : vi editor.  Vi was the first real screen-based editor for UNIX, and is
             : still very popular.  VIM improves on vi by adding new features:
             : multiple windows, multi-level undo, block highlighting and more.  The
             : vim-enhanced package contains a version of VIM with extra, recently
             : introduced features like Python and Perl interpreters.
             : 
             : Install the vim-enhanced package if you'd like to use a version of the
             : VIM editor which includes recently added enhancements like
             : interpreters for the Python and Perl scripting languages.  You'll also
             : need to install the vim-common package.

Now we need to run the installer for vim-enhanced in our terminal. We install vim improved with the following command which will also install all the vim improve dependencies.

$ sudo dnf install vim-enhanced 

Press yes and hit enter to allow the installation to continue.

Sample output

# sudo dnf install vim-enhanced 
DigitalOcean Droplet Agent                                                        73 kB/s | 3.3 kB     00:00    
Dependencies resolved.
=================================================================================================================
 Package                      Architecture         Version                           Repository             Size
=================================================================================================================
Installing:
 vim-enhanced                 x86_64               2:8.2.3512-1.fc34                 updates               1.8 M
Installing dependencies:
 gpm-libs                     x86_64               1.20.7-26.fc34                    fedora                 20 k
 libsodium                    x86_64               1.0.18-7.fc34                     fedora                165 k
 vim-common                   x86_64               2:8.2.3512-1.fc34                 updates               6.7 M
 vim-filesystem               noarch               2:8.2.3512-1.fc34                 updates                22 k

Transaction Summary
=================================================================================================================
Install  5 Packages

Total download size: 8.7 M
Installed size: 35 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): vim-common-8.2.3512-1.fc34.x86_64.rpm                                      23 MB/s | 6.7 MB     00:00    
(2/5): vim-enhanced-8.2.3512-1.fc34.x86_64.rpm                                    54 MB/s | 1.8 MB     00:00    
(3/5): vim-filesystem-8.2.3512-1.fc34.noarch.rpm                                 3.5 MB/s |  22 kB     00:00    
(4/5): libsodium-1.0.18-7.fc34.x86_64.rpm                                        406 kB/s | 165 kB     00:00    
(5/5): gpm-libs-1.20.7-26.fc34.x86_64.rpm                                         48 kB/s |  20 kB     00:00    
-----------------------------------------------------------------------------------------------------------------
Total                                                                            6.5 MB/s | 8.7 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                         1/1 
  Installing       : vim-filesystem-2:8.2.3512-1.fc34.noarch                                                 1/5 
  Installing       : vim-common-2:8.2.3512-1.fc34.x86_64                                                     2/5 
  Installing       : libsodium-1.0.18-7.fc34.x86_64                                                          3/5 
  Installing       : gpm-libs-1.20.7-26.fc34.x86_64                                                          4/5 
  Installing       : vim-enhanced-2:8.2.3512-1.fc34.x86_64                                                   5/5 
  Running scriptlet: vim-enhanced-2:8.2.3512-1.fc34.x86_64                                                   5/5 
  Verifying        : gpm-libs-1.20.7-26.fc34.x86_64                                                          1/5 
  Verifying        : libsodium-1.0.18-7.fc34.x86_64                                                          2/5 
  Verifying        : vim-common-2:8.2.3512-1.fc34.x86_64                                                     3/5 
  Verifying        : vim-enhanced-2:8.2.3512-1.fc34.x86_64                                                   4/5 
  Verifying        : vim-filesystem-2:8.2.3512-1.fc34.noarch                                                 5/5 

Installed:
  gpm-libs-1.20.7-26.fc34.x86_64                           libsodium-1.0.18-7.fc34.x86_64                        
  vim-common-2:8.2.3512-1.fc34.x86_64                      vim-enhanced-2:8.2.3512-1.fc34.x86_64                 
  vim-filesystem-2:8.2.3512-1.fc34.noarch                 

Complete!

The above installation will install command line vim only. To install gui-based vim we can use the following command:

$ sudo dnf install vim-X11

This will install gVim which has gui features like +clipboard. To start gVim we need to run vimx on our terminal.

If you are starting out on vim it is best you try vimtutor first to give you tutorial guide on how to proceed with vim. Launch tutorial with the following command.

$ vimtutor
Vim vimtutor
Vim vimtutor

In order to exit from the vim terminal type <shift:q and enter>

Conclusion

We have learnt how to install vim on our Fedora 35 workstation. Learn more using vimtutor to guide you all through. Incase of a problem please comment below we will get back to you in no time.

About Mason Kipward

I am a technology enthusiast who loves to share gained knowledge through offering daily tips as a way of empowering others. I am fan of Linux and all other things open source.
View all posts by Mason Kipward →

Leave a Reply

Your email address will not be published. Required fields are marked *