Javascript、SublimeCodeIntel 和提示代码智能自动完成 [英] Javascript, SublimeCodeIntel and hinting Code Intelligence auto-completion

查看:18
本文介绍了Javascript、SublimeCodeIntel 和提示代码智能自动完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有使用 Sublime Text 2SublimeCodeIntel 设置 Javascript 自动完成的任何提示或教程>?

Are there any tips or tutorials to set-up Javascript auto-completion with Sublime Text 2 and SublimeCodeIntel?

  • 代码英特尔自动完成的限制是什么(包装函数内的模块等)

  • What are the limitations of Code Intel auto-completion (modules inside wrapper functon, etc.)

Javascript 命名空间树是如何构建的,当 Intel 无法正确猜测时,您能否为代码提供手动提示(例如,在注释中提供某种 @class my.module.Foobar 提示)

How Javascript namespace tree is build and can you give manual hints for the Code Intel when it fails to guess correctly (e.g. give somekind of @class my.module.Foobar hint in comments)

问题是 SublimeCodeIntel 本身并没有描述这个过程,而 Code Intelligence 的原始作者假设你将它与 Komodo IDE 一起使用(我听说它在那里工作得很好)

The problem is that SublimeCodeIntel itself does not describe the process and the orignal authors of Code Intelligence assume you use it with Komodo IDE (where it works fine what I have heard)

还有这里没有答案的论坛主题

Also here goes forum thread without answers

推荐答案

我看了一下 SublimeCodeIntel(SCI) 源代码,我的理解是 lang_javascript.py 描述了 SCI 的能力.文件的简单 grep 显示它依赖于自己的实现并且它不使用外部 JavaScript 词法分析器.它尝试检查 JSDoc 到某个程度,但对我来说,这个实现看起来更像是一个特别的实现.

I had a look at SublimeCodeIntel (SCI) source codes and my understanding is that lang_javascript.py describes what SCI is capable of. A simple grep of the file shows that it relies on its own implementation and it does not use external JavaScript lexer. It tries to check JSDoc to some point but the implementation looks rather like an ad-hoc one to me.

JavaScript 词法分析器似乎没有任何测试,所以很难知道它到底能做什么,但有日志命令,所以你 启用它们 并试一试它的作用.就我个人而言,我对 SCI 的体验相当糟糕(对我来说它很慢而且不够准确),所以我会尝试使用更强大的东西 - 现在它已经过时了,因为问题已经两年了.

The JavaScript lexer does not seem to have any tests so it's hard to know what it can do exactly but there are logging commands so you enable them and give it a go what it does. Personally, I have rather bad experience with SCI (it was slow for me and not accurate enough), so I would try to use something more robust - it's old now as the question is two years old.

这不是对您问题的直接回答,它只是一个分析,如果您仍然是有兴趣.

This is not a direct answer to your questions, it's just an analysis and you'll have to contact the author or dig some more in the source code (which is fairly easy since it's written in Python), if you are still interested.

隐藏的宝石源代码:

#Everything is JS 是一个对象.... MUMUHAHAHAHAHAHAAAA.......

:-)

这篇关于Javascript、SublimeCodeIntel 和提示代码智能自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆