I can't get autoindentation to work for me in Vim. Anytime I press return
, my cursor always goes to the first column on the next line and I have to manually indent the correct amount of space before typing. Is there any way to fix this? None of the existing answers I found SO have helped. I'm editing a Laravel view file called login.blade.php
.
Here is the contents of my .vimrc
:
syntax on
filetype plugin indent on
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
set smartindent
set cindent
colorscheme itg_flat
ADDITIONAL INFO
It appears this is only an issue in .blade.php
files. I think the problem is that it's a .php file but contains HTML code. So the HTML code is not being intended properly since the files extensions is php. If I write HTML code in a .html file, it works correctly.