vi - Command Not Available in This Version

Had a few headaches with vi today, turns out it wasn't reading the .vimrc file, and then that opened up another can of worms...

The Solution

Do all of these as the root user,or vi wont read the configs.

If you haven't installed vim - you should, its possible you are using a pre-installed lightweight version of vi, so to install its more complete sibling;

$ sudo apt-get install vim
$ vi --version | egrep -i 'vimrc|exrc|fall-back'

This then displays the locations of the config files, which on Debian looked like;

system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"

So I edited the vi file vi $HOME/.vimrc and added this code;

set number
filetype on
filetype indent on
filetype plugin on
syntax on
set laststatus=2
set statusline=%<%f\%h%m%r%=%-20.(line=%l\ \ col=%c%V\ \ totlin=%L%)\ \ \%h%m%r%=%-40(bytval=0x%B,%n%Y%)\%P
set ofu=syntaxcomplete#Complete