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

Originally published at: https://www.cyberciti.biz/faq/howto-install-vim-text-editor-under-freebsd/

How do I install VIM text editor for my FreeBSD server? I like vim as it is a highly configurable text editor and efficient one. Currently, it has an old version of vi. How can I install vim text editor on a FreeBSD server or desktop?