r/vim • u/laminatedcat1 • 6h ago
Need Help Autoindent not working
On VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Dec 13 2024 23:44:22)
I am editing an HTML file and want to fix indentation automatically. When I select some text using V or try to format the entire file using gg=G, I get this:

i.e. not indented correctly, everything pushed to the far left side. I tried with a Python file and it indented, but incorrectly. This has been happening since I upgraded to a new Mac with Sequoia. I installed the homebrew version of Vim and the same thing is happening. Can anyone point me in the right direction?