nicwest/QQ.vim — pull request #15 by jargv (2014-12-23 04:59:39+00:00)
Title: Fix bug 14: Finding pprint.py reliably now

I'm not really sure how this fixed the problem on my system. I bet it has something to do with my own configuration. Basically I just moved the initialization of the location variable into a script-level var

```vim
let s:pprint_path = expand(':p:h:h:h')."/pprint.py"
```

Along the way I ran into another bug that was caused by the response not having a "content-type" header. That caused the python script to be invoked with too few arguments because the "l:formatting_type" variable was an empty string. The solution (included) was simply to quote the arguments to the script.

```vim
let l:ppbody = system('python ' . s:pprint_path . ' "' . l:formatting_type . '" "' . l:tmpfn . '"')
```