diff options
Diffstat (limited to 'scripts/get_vimkw.py')
-rw-r--r-- | scripts/get_vimkw.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/get_vimkw.py b/scripts/get_vimkw.py index 1ecf7148..4af5451b 100644 --- a/scripts/get_vimkw.py +++ b/scripts/get_vimkw.py @@ -22,11 +22,15 @@ def getkw(input, output): # Extract all the shortened versions for i in r_item.finditer(m.group(2)): - d.append((i.group(1), "%s%s" % (i.group(1), i.group(2) or ''))) - d.sort() + d.append('(%r,%r)' % (i.group(1), "%s%s" % (i.group(1), i.group(2) or ''))) + + output_info['option'].append("('nnoremap','nnoremap')") + output_info['option'].append("('inoremap','inoremap')") + output_info['option'].append("('vnoremap','vnoremap')") for a, b in output_info.items(): - print >>out, '%s=%r' % (a, b) + b.sort() + print >>out, '%s=[%s]' % (a, ','.join(b)) def is_keyword(w, keywords): for i in range(len(w), 0, -1): @@ -35,4 +39,4 @@ def is_keyword(w, keywords): return False if __name__ == "__main__": - getkw("/usr/share/vim/vim70/syntax/vim.vim", "temp.py") + getkw("/usr/share/vim/vim73/syntax/vim.vim", "temp.py") |