<div dir="ltr">What version of vim are you using? There seem to be a number of things that don't work for me (I'm on Ubuntu Linux):<div><br></div><div>- `:help python-special-path` isn't available<br></div><div>
- `vim.vars` doesn't exist</div><div>- Putting the file in `~/.vim/pythonx` doesn't seem to work (`ImportError: No module named clang_format`)</div><div><br></div><div>Overall, I think that being able to configure the formatting behavior from e.g. `autocmd FileType` is a win, but this patch doesn't seem to work for me.</div>
<div><br></div><div><br></div><div>-- Sean Silva</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Sep 15, 2013 at 10:37 PM, Steffen Prohaska <span dir="ltr"><<a href="mailto:prohaska@zib.de" target="_blank">prohaska@zib.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On Sep 16, 2013, at 1:51 AM, Sean Silva <<a href="mailto:silvas@purdue.edu">silvas@purdue.edu</a>> wrote:<br>
<br>
> Could you maybe describe what's different, and why?<br>
<br>
</div>I tried to describe and justify the differences in the suggested commit message.  Maybe it is a bit short.  But it's not obvious to me what is missing.<br>
<br>
Do you have any specific questions?<br>
<span class="HOEnZb"><font color="#888888"><br>
        Steffen<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
> On Sun, Sep 15, 2013 at 7:20 AM, Steffen Prohaska <<a href="mailto:prohaska@zib.de">prohaska@zib.de</a>> wrote:<br>
> Hello,<br>
><br>
> I've attached a slightly modified clang-format.py for vim integration.  Feel free to commit it to the official svn in case you like it.  I'd suggest the following commit message:<br>
><br>
> '''<br>
> clang-format: Use a Python module in vim with config via 'g:' globals<br>
><br>
> clang-format.py is changed to a Python module (therefore renamed to<br>
> 'clang_format.py'), which is imported once into vim and then directly<br>
> called from vim mappings.  Configuration now works via global vim<br>
> variables 'g:clang_format_binary' and 'g:clang_format_style'.  Using<br>
> global variables is more flexible than hard-coded values in the Python<br>
> script.  For example, the style can be changed on-the-fly in 'autocmd<br>
> FileType'.<br>
> '''<br>
><br>
> Best,<br>
>   Steffen Prohaska<br>
><br>
><br>
> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>