summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-02-05 09:44:00 +0100
committerGeorg Brandl <georg@python.org>2012-02-05 09:44:00 +0100
commit4b50a1eeb3c99dff807a31040bc76184c7639cfd (patch)
treee194ea4f237f602ea274bb342a5467d8702be838 /scripts
parent2a789c7428dfced136eaaca440c5de22cfc4bbe2 (diff)
downloadpygments-4b50a1eeb3c99dff807a31040bc76184c7639cfd.tar.gz
Closes #723: update vim commands.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/get_vimkw.py12
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")