[cfe-dev] Slightly improved clang-format vim integration

Steffen Prohaska prohaska at zib.de
Sun Sep 15 04:20:26 PDT 2013


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang_format.py
Type: text/x-python-script
Size: 3718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130915/adcd5a47/attachment.bin>


More information about the cfe-dev mailing list