[cfe-dev] Slightly improved clang-format vim integration
Sean Silva
silvas at purdue.edu
Mon Sep 16 08:17:00 PDT 2013
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):
- `:help python-special-path` isn't available
- `vim.vars` doesn't exist
- Putting the file in `~/.vim/pythonx` doesn't seem to work (`ImportError:
No module named clang_format`)
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.
-- Sean Silva
On Sun, Sep 15, 2013 at 10:37 PM, Steffen Prohaska <prohaska at zib.de> wrote:
>
> On Sep 16, 2013, at 1:51 AM, Sean Silva <silvas at purdue.edu> wrote:
>
> > Could you maybe describe what's different, and why?
>
> 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.
>
> Do you have any specific questions?
>
> Steffen
>
>
> > On Sun, Sep 15, 2013 at 7:20 AM, Steffen Prohaska <prohaska at zib.de>
> wrote:
> > Hello,
> >
> > 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:
> >
> > '''
> > clang-format: Use a Python module in vim with config via 'g:' globals
> >
> > clang-format.py is changed to a Python module (therefore renamed to
> > 'clang_format.py'), which is imported once into vim and then directly
> > called from vim mappings. Configuration now works via global vim
> > variables 'g:clang_format_binary' and 'g:clang_format_style'. Using
> > global variables is more flexible than hard-coded values in the Python
> > script. For example, the style can be changed on-the-fly in 'autocmd
> > FileType'.
> > '''
> >
> > Best,
> > Steffen Prohaska
> >
> >
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130916/7ae58e1e/attachment.html>
More information about the cfe-dev
mailing list