Wednesday, August 22, 2012

How to restore vim screen when exiting

When you exit vim it does not restore the terminal screen (particularly in FreeBSD), here is how to fix that (file ~/.vimrc):
" Restore terminal screen when exiting Vim
if &term =~ "xterm"
  let &t_ti = "\<Esc>[?47h"
  let &t_te = "\<Esc>[?47l"

Sunday, August 19, 2012

Rebuilding World and Kernel on FreeBSD

Building the world and kernel on FreeBSD is just few steps procedure. The Handbook explains everything in great details. Here is short version.

Keep FreeBSD up to date with csup

csup is a simple tool to keep you FreeBSD source and/or ports collection up to date (rewrite of CSVup in C). There are a number of mirrors around the world hosting the source code and you need to select one that is closest to your location. Use a tool like traceroute to find a one that responds best (shortest path, low delays).

FreeBSD Binary/Security Updates

freebsd-update is a tool to fetch and update binary security patches for official releases. e.g. FreeBSD 9.0-RELEASE. Once you made fresh OS install this is the way to update your system quickly.
freebsd-update fetch
freebsd-update install
Note, this tool doesn't work if you build world/kernel from source.