admin管理员组

文章数量:1325236

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

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

  • 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 ments)

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

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

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

  • 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 ments)

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

Share edited Oct 30, 2015 at 16:55 vinayakj 5,6813 gold badges29 silver badges49 bronze badges asked Jul 6, 2012 at 10:42 Mikko OhtamaaMikko Ohtamaa 83.7k60 gold badges287 silver badges468 bronze badges 2
  • Be careful with code intel. It has some problems regarding CPU usage. – Olical Commented Aug 3, 2012 at 9:41
  • See also blog post discussing about this opensourcehacker./2013/03/04/… – Mikko Ohtamaa Commented Mar 4, 2013 at 14:52
Add a ment  | 

2 Answers 2

Reset to default 1

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.

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 mands 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.


There are hidden gems in the source code though:

# Everything is JS is an object.... MUMUHAHAHAHAHAHAAAA.......

:-)

This is a good question. However, your answer is not something that is attainable via this forum. Since the SublimeCodeIntel project is open-source, your best resource is to simply read the code. This may be time-consuming especially if the documentation is weak, but it's ultimately the best way to go when using open-source products. The nice (and, IMO, cool) thing is that you can easily contribute to making it a better product, if so inclined.

You're obviously familiar enough with Sublime Text 2 and it's code pletion plugin to the point in which you feel fortable positing this question. Someone could read through the code and spoon-feed you an answer, but that would help no one, especially you, given your interest. I've personally experienced issues regarding a few Sublime Text plugins and just learn to ignore them blissfully while evangelizing the fundamental merits of this IDE.

I look forward to the possibility (at this point) of seeing someone post a listing summarizing your questions -- I would find it helpful too ... but, only for a week. It's open-source and as such changes rapidly. Your question can ultimately only be answered within the context of the effort you wish to put into contributing to it's further development.

https://github./Kronuz/SublimeCodeIntel

本文标签: