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.

  • 1
    and finally, what does setg filetype? return? – Christian Brabandt May 11 '18 at 7:58
  • yes setg filetype gets me startify! I was not aware of :setg! thanks – LazyLeopard May 11 '18 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.