alfredodeza / pytest.vim

Runs your UnitTests with py.test displaying red/green bars and errors
274 stars 40 forks source link

plugin isn't being loaded for python files for me #41

Closed dgoldstein0 closed 8 years ago

dgoldstein0 commented 8 years ago

I tried adding this plugin to my existing vim setup, which uses pathogen to load all my plugins - I installed it under .vim/bundle/pytest.vim, and can see that pathogen adds it as part of runtime files, but afaict it's just not being executed at all when I open a python file - which I've verified has the correct filetype set.

So I'm at a loss for what might be going wrong. Would appreciate some help.

My dotfiles repo is here: https://github.com/dgoldstein0/settings_files

I have the repo cloned to .vim/bundle/pytest.vim, and .vim is symlinked from ~/.vim... but the Pytest command doesn't show up in python files, and when I edited pytest.vim directly / inspected it's variables, it looked like it's just not run at all.

alfredodeza commented 8 years ago

Try adding:

filetype plugin on

On your vimrc and see if that fixes it.

dgoldstein0 commented 8 years ago

that's exactly what I needed. Thanks!

mildly curious - what does that do that filetype on doesn't?

alfredodeza commented 8 years ago

@dgoldstein0 this plugin is a "filetype" plugin, that is: it is only loaded when there is a matching filetype for the plugin.

filetype on just enables detection, nothing to do with enabling plugins for file types.

A bit confusing.

I am going to re-open this so I can update the docs. This should have been properly documented.

alfredodeza commented 8 years ago

Fixed with commit ca43012123d66e0eaad3b5ae543052a947c0060c