[英]vim and Ultisnips
I'm trying to understand how Ultisnips works (very few documentation when you're a beginner like me) and in the all.snippets
code there a function that returns vim.eval("&comments")
我正在尝试了解Ultisnips的工作方式(当您是像我这样的初学者时,很少有文档),在all.snippets
代码中,有一个返回vim.eval("&comments")
的函数。
So I'm trying to guess how this works, and if I try: 所以我试图猜测它是如何工作的,如果我尝试:
:let g=eval("&comments")
:echo g
I get this: s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
when i'm in the snippet file . 我得到这个: s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
当我在代码片段文件中时 。
If I open up a an empy Php file and try the previous code I get s:<!--,m: ,e:-->
如果我打开一个empy Php文件并尝试前面的代码,则得到s:<!--,m: ,e:-->
I want to have the classical comment like this /* */
configured to that I could call the sample snippet " box
" (it works but adds <!-- -->
= HTML comment delimiters instead of actual Php comment delimiters). 我希望将这样的经典注释/* */
配置为可以将示例代码段称为“ box
”(它可以工作,但添加<!-- -->
= HTML注释定界符,而不是实际的Php注释定界符)。
How can I guess when it's assigned, and how to change <!-- -->
to /* */
? 我怎么能猜时,它的分配,以及如何改变<!-- -->
到/* */
?
You want to use commentstring
instead of comments
. 您想使用commentstring
而不是comments
。 The former is set to the correct valus in php. 前者设置为php中的正确值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.