Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加对于js函数返回值的索引的支持 #29

Open
corvofeng opened this issue Sep 7, 2020 · 0 comments
Open

增加对于js函数返回值的索引的支持 #29

corvofeng opened this issue Sep 7, 2020 · 0 comments

Comments

@corvofeng
Copy link
Owner

下面是all.snippets中的一个片段

snippet todo "TODO comment" bw
`!p snip.rv=get_comment_format()[0]` ${2:TODO}: $0${3: <${4:`!v strftime('%d-%m-%y')`}${5:, `!v g:snips_author`}>} `!p snip.rv=get_comment_format()[2]`
endsnippet

片段中比较重要的部分就是:!p snip.rv=get_comment_format()[0]

该模板需要被分为两部分解析:
get_comment_format,与[0]

其中, get_comment_format用于获取当前源代码的注释方式, 需要在补全时方能知道

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant