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...
Do all of these as the root user, or vi won't 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
A tech native with 20 years of experience across the digital space. Darryl is an evangelist for the power and disruption of blockchain technologies and fosters a passion for bringing ever greater utility and adoption to the masses.
Copyright © 2016-2023 Bonbon Group Ltd. All Rights Reserved.