简体   繁体   English

Textmate:jsdoc评论?

[英]Textmate: jsdoc comment?

I'm pretty new to TextMate and I just can't figure out how to make JSDoc like comment when editing .js file. 我对TextMate相当陌生,只是无法弄清楚在编辑.js文件时如何使JSDoc像注释一样。 I'm using the PHP bundle and there it is pretty easy - I just type doc and then tab. 我使用的是PHP捆绑包,这非常简单-我只输入doc,然后按Tab。 I've already added custom snippet but the problem is that it does not handle new lines properly (it doesn't insert trailing *). 我已经添加了自定义代码段,但问题是它不能正确处理新行(它不会插入结尾的*)。

You'll need to install a JSDoc bundle, but it doesn't look like there's much available. 您需要安装JSDoc捆绑软件,但看起来没有太多可用。 A quick google search did bring up something though: https://github.com/tysontate/javascript-jsdoc-tmbundle 快速谷歌搜索确实带来了一些东西: https : //github.com/tysontate/javascript-jsdoc-tmbundle

No idea if it's any good, and it actually says that the commands don't yet work, but it appears to have seen at least some activity lately (unlike the others I found). 不知道它是否有用,它实际上说这些命令尚不起作用,但是最近似乎至少看到了一些活动(与我发现的其他活动不同)。 It looks like there just aren't that many people who are using JS Doc (or, at least not that many TextMate users who are using it). 看起来使用JS Doc的人并不多(或者至少没有那么多使用Text的用户)。

Usually, googling for " something bundle textmate" will yield the right results, but apparently JSDoc just isn't that commonly used. 通常,使用谷歌搜索“ 捆文本伴侣”将产生正确的结果,但是显然JSDoc并不常用。

However, maybe someone has added some JSDoc functionality to the existing JavaScript bundle (much like you've started doing). 但是,也许有人在现有的JavaScript包中添加了一些JSDoc功能(就像您开始做的那样)。 Didn't try looking for that, but you might get lucky. 没有尝试寻找,但是您可能会很幸运。

But hey, it's a good excuse to get your hands dirty (and learn a lot about TextMate in the process) by messing around with whatever the available bundles have to offer, maybe even fixing a few bugs, and giving something back to the community (you don't have to of course, it's just a suggestion). 但是,嘿,这是个好借口,弄乱可用捆绑包提供的任何内容,甚至可以修复一些错误,并回馈社区(在此过程中,您可以学到很多有关TextMate的知识)。您当然不需要,这只是一个建议)。

Not much of an answer, but hopefully you'll find our way from here 答案不多,但希望您能从这里找到自己的出路

https://github.com/rootworkit/JsDoc-Toolkit.tmbundle提供了更新的捆绑包,其中包含用于在TextMate 2中编辑JSDoc注释的工具。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM