Vim set noexpandtab doesn't work

Vim

Image credit: Unsplash

Recently i was writing some python code, i always encountered this error:

image-20220728120446489

And what confuses me is that i have use set noexpandtab command in ~/.vimrc, but it doesn’t work. Today i cannot stand it anymore, so i search it and find that answer. It seems like python plugin overwrite my setting.

Solution

  1. use :verbose set noexpandtab? to find the plugin file

    image-20220728120914214

  2. search expandtab in that file

    image-20220728121003564

  3. change it to noexpandtab

Qianlong Sang
Qianlong Sang
Fifth-Year Computer Science
Ph.D. Student

My research focuses on operating systems, mobile and edge systems, and efficient on-device AI inference.