ajzcole
ajzcole

Reputation: 13

Neovim Automatically Uses 4 Spaces Instead of Tabs for Python

Title says it all. How can I change this behaviour, so that the indentation is always a tab character and not 4 spaces?

I don't get the same issue when not editing python files. Not that I edit many different file types, but I can at least confirm for c, plaintext and tex (as in LaTeX).

Using version 0.4.4 from the Gentoo repos.

Upvotes: 1

Views: 3303

Answers (1)

j1-lee
j1-lee

Reputation: 13939

Try putting let g:python_recommended_style = 0 in your vimrc, and configuring autocmds such as autocmd FileType python setlocal noexpandtab if needed.

Upvotes: 3

Related Questions