Vimrc not working

I use Manjaro 21 KDE

I try to get Vi to work properly witch backspace and i have edited ~/.vimrc with:
set nocompatible
set fileformats=unix,dos
set history=100
set ignorecase
set number
set showmatch
syntax on
highlight Comment ctermfg=LightCyan
set wrap
set incsearch
set hlsearch
set smartcase

But none of the options appear in vi. How is this possible? I reopened my shell and even rebooted my PC even though is seems useless. I tried /etc/vimrc to add the settings, also not workling

~/.vimrc is for vim
man vi
says in the “Files” section:
$HOME/.exrc

vi != vim

Is vim installed? What returns which vim ?

Good answer, i could have seen that myself. But if i rename .vimrc to .exrc the problem is the same

Yes i installed i because i could not get vi to work properly “/usr/bin/vim”

I think that file in vi and ex is for a totally different purpose.
These options will not work in vi or ex.
But I know very little - just that I usually do not use vi but vim instead
and only basic functions.

I ended up aliasing vi to vim with:

/root/.vimrc & ~/.vimrc
set nocompatible
set fileformats=unix,dos
set history=100
set ignorecase
set number
set showmatch
syntax on
highlight Comment ctermfg=LightCyan
set wrap
set incsearch
set hlsearch
set smartcase

/root/.bashrc & ~/.bashrc
alias vi=vim
alias sudo="sudo " (needed when sudo is used)

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.