Vim ignores tabstop for *.ino files

Is this somehing to do with the Fedora packaging?

I have ts and tabstop set to 4 in my .exrc and .vimrc files, and have “filetype indent off” in it, and this works with Python and new files, etc, but for Ardino sketches (files ending in .ino) vim somehow overrides this to tabstop=2.

Even if I set “set tabstop=4” and “set ts=4” while editing the file vim ignores the setting and uses 2.

I want to disable filetype specific junk completely. Is there a way to do this? I thought “filetype indent off” was supposed to have this effect?

Now that I think of it, I have “syntax off” set in my .vimrc/.exrc and syntax highlighting matches braces and brackets, maybe my .vimrc/.exrc is being ignored?

Excerpted from /usr/share/vim/vim91/doc/filetype.txt:

ARDUINO                                                 ft-arduino-plugin

By default the following options are set, in accordance with the default
settings of Arduino IDE:

        setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2

To disable this behavior, set the following variable in your vimrc:

        let g:arduino_recommended_style = 0 


$ grep -i arduino /usr/share/vim/vim91/filetype.vim
" Arduino
au BufNewFile,BufRead *.ino,*.pde		setf arduino

HTH :slightly_smiling_face:

2 Likes