1

Right now I have a python (*.py) file buffer open in a vim session. I also have the plugin startify installed.

Now when I run the Ex-command:

echo &g:filetype`

I get startify.

However, When I run

echo &filetype

I get python.

I have tried doing setl filetype? and set filetype?, I get python for both. So it is not an issue of local vs global setting. I can't seem to find anything relevant the docs for 'filetype' or :set.

Once I run set ft=python on the buffer, both echo &ft and echo &g:ft start displaying python.

How can this be explained? What am I missing?

PS: I am using vim 8.0(1-133) on windows 7.

2
  • 2
    and finally, what does setg filetype? return? May 11, 2018 at 7:58
  • yes setg filetype gets me startify! I was not aware of :setg! thanks May 11, 2018 at 8:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.