1
0
mirror of https://github.com/amix/vimrc synced 2025-07-12 22:24:59 +08:00

😼 Update plugins

This commit is contained in:
SUPERustam
2021-09-11 14:42:06 +03:00
parent 96bb75d663
commit e3b05f640b
61 changed files with 2215 additions and 830 deletions

View File

@ -73,7 +73,23 @@ class Arg(object):
def get_args(arglist):
args = [Arg(arg) for arg in arglist.split(',') if arg]
args = []
n = len(arglist)
i = 0
while i < n:
l_bracket = 0
start = i
while i < n and (l_bracket > 0 or arglist[i] != ','):
if arglist[i] == '[':
l_bracket += 1
elif arglist[i] == ']' and l_bracket > 0:
l_bracket -= 1
i += 1
arg = arglist[start:i]
if arg:
args.append(Arg(arg))
i += 1
args = [arg for arg in args if arg.name != 'self']
return args