1
0
mirror of https://github.com/amix/vimrc synced 2025-07-13 06:35:01 +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

@ -112,12 +112,12 @@ snippet img "Image"
endsnippet
snippet ilc "Inline Code" i
\`$1\`$0
\`${1:${VISUAL}}\`$0
endsnippet
snippet cbl "Codeblock" b
\`\`\`
$1
\`\`\`$1
${2:${VISUAL}}
\`\`\`
$0
endsnippet

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