Let’s say you already use ports in order to install on your FreeBSD system the tools you need for your daily work. One of my collection is vim.

Well, do yourself a favour and never go straight to /usr/ports/editors/vim trying to get it: you will end up downloading MB of useless X11 stuff you really didn’t meant to install. Here’s the easy way:

cd /usr/ports/editors/vim-lite/
make install clean

here you go :) If you want a fancier vim, with syntax highlight as on most linux distros, create and edit your ~/.vimrc as follows:

 set nocompatible
 filetype on
 filetype indent on
 syntax on
 if has("autocmd")
   au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
    \| exe "normal! g'\"" | endif
 endif