Lines Matching refs:vim
1 # This file is a minimal clang-format vim-integration. To install:
33 import vim
38 if vim.eval('exists("g:clang_format_path")') == "1":
39 binary = vim.eval('g:clang_format_path')
47 if vim.eval('exists("g:clang_format_fallback_style")') == "1":
48 fallback_style = vim.eval('g:clang_format_fallback_style')
52 buf = vim.current.buffer
56 if vim.eval('exists("l:lines")') == '1':
57 lines = vim.eval('l:lines')
59 lines = '%s:%s' % (vim.current.range.start + 1, vim.current.range.end + 1)
62 cursor = int(vim.eval('line2byte(line("."))+col(".")')) - 2
80 if vim.current.buffer.name:
81 command.extend(['-assume-filename', vim.current.buffer.name])
98 sequence = difflib.SequenceMatcher(None, vim.current.buffer, lines)
101 vim.current.buffer[op[1]:op[2]] = lines[op[3]:op[4]]
104 vim.command('goto %d' % (output['Cursor'] + 1))