You just moved from Linux or Windows to FreeBSD and you’re wondering how you can install VIM Text Editor on FreeBSD 12?. Choosing the right text/code editor for your daily tasks is crucial to ensure you deliver in time and keep up with the workload.

VIM comes with an impressive set of features which can be extended using the plenty of plugins available for various Programming Languages. It is sad that FreeBSD 12 is not shipped with VIM text editor but it can be easily installed using ports or binary installation.

$ vim
vim: Command not found.

Install VIM Text Editor on FreeBSD 12 by running the command:

# pkg install vim
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01    
Fetching packagesite.txz: 100%    6 MiB 431.1kB/s    00:15    
Processing entries: 100%
FreeBSD repository update completed. 31468 packages processed.
All repositories are up to date.
The following 76 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
	vim: 8.1.0342
Number of packages to be installed: 76

The process will require 414 MiB more space.
70 MiB to be downloaded.

Proceed with this action? [y/N]: y

The binary package will be installed to:

# which vim

If you now execute the vim command, you should get below output.

install vim freebsd 12 version

Configure vim with basic settings by creating a new file on ~/.vimrc with the contents below.

set nocompatible
set backup
set history=1000
set ignorecase
set smartcase
set hlsearch
set incsearch
set number
set showmatch
syntax on
highlight Comment ctermfg=LightCyan
set wrap

Save the file and then exit. You now have VIM Text Editor installed on your FreeBSD 12 operating system.

If you’re new to VIM, read the Vim Cheat Sheet guide.

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here