[FreeBSD] How to install VIM in FreeBSD


Gaming Laptop Series
[wr_row][wr_column]By default FreeBSD comes in a command line user interface.
As an Administrator or a Device Drive developer or as a FreeBSD user, you must be having a good text editor in hand to work comfortably on a command line environment.
By default there are two such text editors installed under FreeBSD, such as: vi and ee.
There is no such drawback in these editors but VIM (Vi IMproved) is a feature rich text editor as compared to the others, such as: you can access multiple files simultaneously, search for keywords easily across files and many more.

Make sure you have a working internet connection on the system and ports collection installed.

Installing VIM:

For FreeBSD 8.4 and greater versions:
If you are on FreeBSD 8.4 or later, then you can use the next generation package management utility present in FreeBSD.
We will use the pkg utility and even the ports collection will also be useful but why to use a complex path when we have easy to use stuffs.
To install VIM on your machine, type the following command in the command line:

# pkg install editors/vim-lite

For FreeBSD version less than 8.4:
If you are on FreeBSD machine lower than 8.4 version, then you have to use the ports collection and if you don’t have, then the below link will help you out installing the ports collection:
Installing ports collection

Now find out where is the location of VIM editor sources that we are going to install.
To know type the following command:

# whereis vim-lite

Then move to the location:

# cd /usr/ports/editors/vim-lite

Type the following command to start installation:

# make install clean

The above step will first build the dependencies for, then install the VIM editor in your machine and after that it will remove the intermediate files generated while building VIM.

After successful completion of the above step type the vim command to see whether vim has installed or not.

$ vim

If you want more information on VIM text editor:

You can check the manual page on your FreeBSD system to have a better idea on VIM editor.

$ man vim

To know more on VIM usage and some useful VIM commands, follow the below link:
Useful VIM commands[/wr_column]][wr_text]By default FreeBSD comes in a command line user interface.
As an Administrator or a Device Drive developer or as a FreeBSD user, you must be having a good text editor in hand to work comfortably on a command line environment.
By default there are two such text editors installed under FreeBSD, such as: vi and ee.
There is no such drawback in these editors but VIM (Vi IMproved) is a feature rich text editor as compared to the others, such as: you can access multiple files simultaneously, search for keywords easily across files and many more.

Make sure you have a working internet connection on the system and ports collection installed.

Installing VIM:

For FreeBSD 8.4 and greater versions:
If you are on FreeBSD 8.4 or later, then you can use the next generation package management utility present in FreeBSD.
We will use the pkg utility and even the ports collection will also be useful but why to use a complex path when we have easy to use stuffs.
To install VIM on your machine, type the following command in the command line:

# pkg install editors/vim-lite

For FreeBSD version less than 8.4:
If you are on FreeBSD machine lower than 8.4 version, then you have to use the ports collection and if you don’t have, then the below link will help you out installing the ports collection:
Installing ports collection

Now find out where is the location of VIM editor sources that we are going to install.
To know type the following command:

# whereis vim-lite

Then move to the location:

# cd /usr/ports/editors/vim-lite

Type the following command to start installation:

# make install clean

The above step will first build the dependencies for, then install the VIM editor in your machine and after that it will remove the intermediate files generated while building VIM.

After successful completion of the above step type the vim command to see whether vim has installed or not.

$ vim

If you want more information on VIM text editor:

You can check the manual page on your FreeBSD system to have a better idea on VIM editor.

$ man vim

To know more on VIM usage and some useful VIM commands, follow the below link:
Useful VIM commands[/wr_text][/wr_column][/wr_row]

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.