indent for python files

25 views
Skip to first unread message

Stefan Thomas

unread,
Jul 13, 2025, 6:47:43 AMJul 13
to v...@vim.org
Hello everyone.
I have the problem that the automatic indentation for Python files no longer works for me.
I assume that it is related to the newer version of the program (9.1).
Can anyone help me?
Thanks,
Stefan

Christian Brabandt

unread,
Jul 13, 2025, 11:09:59 AMJul 13
to vim...@googlegroups.com, v...@vim.org

Hi Stefan,
Can you please give an example with what you see and what you expect?
Have you tried this using vim --clean?

Thanks,
Christian
--
Rune's Rule:
If you don't care where you are, you ain't lost.

Stefan Thomas

unread,
Jul 13, 2025, 5:34:21 PMJul 13
to vim...@googlegroups.com, v...@vim.org
Dear Christian:
When I type in a py-file
for i in range(3):
I don't get an indentation when I type
print(i)
in the following line.
Is --clean a command line option for vim?


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/aHPMMtwzd7PaeFH0%40256bit.org.

Christian Brabandt

unread,
Jul 14, 2025, 12:53:25 PMJul 14
to vim...@googlegroups.com
Hi Stefan,
make sure you have :filetype plugin indent on in your personal vimrc
file. This enables the filetype specific indentation. And yes `--clean`
is a command line option for Vim. Please read about it at `:h --clean`.
It starts Vim with only minimal configuration options (but e.g. enables
filetype specific indentation.

Thanks,
Chris
Reply all
Reply to author
Forward
0 new messages