When trying to open vi/vim the following message could appear:

"E437: terminal capability "cm" required"

To fix it type:

$ export TERM=xterm