Even if I have an empty ~/.vimrc i.e. delete all the lines, the document displays like this. Only if I remove the file ~/.vimrc it resolves. I'm new to vim, pls help.
Edit: From the ArchWiki:
Commonly expected behavior such as syntax highlighting is enabled in
defaults.vim
, which is loaded when no~/.vimrc
is present. Addlet skip_defaults_vim=1
to/etc/vimrc
to disable loading ofdefaults.vim
completely.
Means defaults.vim
isn't loaded if ~/.vimrc
is present. This is what causing the problem. There was this set display=truncate
line in defaults.vim
running what solve the issue. So I put that in my vimrc and it's solved.