Open corvofeng opened 4 years ago
下面是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]
!p snip.rv=get_comment_format()[0]
该模板需要被分为两部分解析: get_comment_format,与[0]
get_comment_format
[0]
其中, get_comment_format用于获取当前源代码的注释方式, 需要在补全时方能知道
下面是all.snippets中的一个片段
片段中比较重要的部分就是:
!p snip.rv=get_comment_format()[0]
该模板需要被分为两部分解析:
get_comment_format
,与[0]
其中,
get_comment_format
用于获取当前源代码的注释方式, 需要在补全时方能知道