Avoid Vim overwriting indention settings
I have tons of files in Python and other languages written as indented by 2 spaces, so I have the following settings in my ~/.vimrc:
However, after I installed Vim 8.0 and python-mode for myself, I keep getting shiftwidth rewritten as 4 when I open Python files. I tried uninstalling python-mode, but it doesn't help.
The reason is here, and there is an issue filed against this behavior.
To avoid modifying tons of files, I added the following line to my ~/.vimrc to turn this feature off.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab |
The reason is here, and there is an issue filed against this behavior.
To avoid modifying tons of files, I added the following line to my ~/.vimrc to turn this feature off.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let g:python_recommended_style = 0 |