How To Install vim-commentary on Fedora 36

In this tutorial we learn how to install vim-commentary in Fedora 36. vim-commentary is Comment and uncomments stuff in Vim using motion as a target

Introduction

In this tutorial we learn how to install vim-commentary on Fedora 36.

What is vim-commentary

Comment stuff out. Use gcc to comment out a line (takes a count), gc to comment out the target of a motion (for example, gcap to comment out a paragraph), and gc in visual mode to comment out the selection. That’s it. Oh, and it uncomments, too. The above maps actually toggle, and gcgc uncomments a set of adjacent commented lines.

We can use yum or dnf to install vim-commentary on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install vim-commentary.

Install vim-commentary on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install vim-commentary using dnf by running the following command:

sudo dnf -y install vim-commentary

Install vim-commentary on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install vim-commentary using yum by running the following command:

sudo yum -y install vim-commentary

How To Uninstall vim-commentary on Fedora 36

To uninstall only the vim-commentary package we can use the following command:

sudo dnf remove vim-commentary

vim-commentary Package Contents on Fedora 36

/usr/share/appdata/vim-commentary.metainfo.xml
/usr/share/doc/vim-commentary
/usr/share/doc/vim-commentary/CONTRIBUTING.markdown
/usr/share/doc/vim-commentary/README.markdown
/usr/share/vim/vimfiles/doc/commentary.txt
/usr/share/vim/vimfiles/plugin/commentary.vim

References

Summary

In this tutorial we learn how to install vim-commentary on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).