How To: FreeBSD install VIM text editor using pkg and ports

How To: FreeBSD install VIM text editor using pkg and ports

To install vim on FreeBSD using the "pkg" utility or the "ports" tree, you will need to have root privileges or access to a user with sudo privileges.

  1. To install vim using the "pkg" utility:
  • First, update the package repository by running the following command:
sudo pkg update
Source‮ual.www:‬tturi.com
  • Install vim by running the following command:
sudo pkg install vim

This will install the latest version of vim available in the package repository.

  1. To install vim from the "ports" tree:
  • First, update the ports tree by running the following command:
sudo portsnap fetch update
  • Change to the directory where the vim port is located:
cd /usr/ports/editors/vim
  • Install vim by running the following command:
sudo make install

This will compile and install vim from the sources. You may need to install additional dependencies if prompted.

  1. Once the installation is complete, you can start using vim. To start vim, run the following command:
vim

This will open vim in the terminal. You can use it to edit files or enter command mode by pressing the "Esc" key.

Created Time:2017-10-29 22:08:34  Author:lautturi