diff --git a/.vim/syntax/clang-format.py b/.vim/syntax/clang-format.py index 187125e..fed9356 100755 --- a/.vim/syntax/clang-format.py +++ b/.vim/syntax/clang-format.py @@ -77,6 +77,9 @@ def main(): lines = ['-lines', '%s:%s' % (vim.current.range.start + 1, vim.current.range.end + 1)] + if vim.eval('exists("g:clang_style")') == '1': + style = vim.eval('g:clang_style') + # Determine the cursor position. cursor = int(vim.eval('line2byte(line("."))+col(".")')) - 2 if cursor < 0: