1
0
mirror of https://github.com/amix/vimrc synced 2025-06-16 01:25:00 +08:00

Updated plugins

This commit is contained in:
amix
2014-04-18 13:58:02 +01:00
parent ac3ef260c8
commit 6a16a9393c
91 changed files with 2554 additions and 708 deletions

View File

@ -12,6 +12,8 @@ from string import Template
import re
from collections import Counter
from vimsnippets import complete
#http://docutils.sourceforge.net/docs/ref/rst/roles.html
TEXT_ROLES = ['emphasis','literal','code','math',
'pep-reference','rfc-reference',
@ -130,27 +132,6 @@ def get_popular_code_type():
except IndexError:
popular_type = "lua" # Don't break default
return popular_type
def complete(t, opts):
"""
get options that start with t
:param t: query string
:param opts: list that needs to be completed
:return: a string that start with t
"""
msg = "({0})"
if t:
opts = [ m[len(t):] for m in opts if m.startswith(t) ]
if len(opts) == 1:
return opts[0]
if not len(opts):
msg = "{0}"
return msg.format("|".join(opts))
endglobal
snippet part "Part" b