I am trying to have set filetype=python
automatically executed when I open a file ending in .xsh. However when I try it and then run the command set ft?
it always shows me the file as xonsh
. This is correct but the xonsh filetype doesn't support automatic indenting like python
filetype does.
I have tried putting the following in my ~/.vimrc file
autocmd BufRead,BufNewFile *.xsh setf python
but it is always somehow getting overridden as xonsh type.
Any thoughts on how I can make this setting stick on startup?
:h new-filetype
xonsh
and the extension.xsh
are not recognised by Vim out of the box so we are missing some context, here. You probably have some custom plugin forxonsh
that we don't know about.