Home Download Buy Blog Forum Support

Intellisense

Intellisense

Postby jchannon on Sun Oct 02, 2011 4:19 pm

Hi

I have just come across Sublime Text 2 but I come from an IDE environment.

I can code HTML, CSS and basic JavaScript in a text editor but I'm starting to use node.js and need to find an editor. When using jQuery in Visual Studio it provides intellisense/code completion which allows me to see what things I can do with my objects and also has notes on each function parameter.

I know a lot of people don't like intellisense but I find it very helpful when learning a language as you don't have to jump to documentation trying to find answers etc. Whilst I have a node.js app working I had to search high and low for information to get it running how I wanted.

So I was wondering whether there is an intellisense option for node.js and the various packages available eg/socket.io so I can understand the available functions and information for function arguments.

I already have SublimeCodeIntel installed.

Thanks
jchannon
 
Posts: 11
Joined: Sun Oct 02, 2011 4:09 pm

Re: Intellisense

Postby jchannon on Wed Oct 05, 2011 9:05 am

Any comments?
jchannon
 
Posts: 11
Joined: Sun Oct 02, 2011 4:09 pm

Re: Intellisense

Postby grayrest on Wed Oct 05, 2011 4:47 pm

Code completion in dynamic languages is mostly a miss outside dedicated IDEs. If the language in question has an analysis server/python module a la golang (go) or rope (python) then it's possible but in my experience it doesn't work as well as Intellisense. You can get fairly widespread static code analysis using the ctags infrastructure but I've always found it to be a hassle.

For the specific case of javascript, you're even worse off. On top of being a dynamic language everybody implements their own class model and you have to understand that in order to determine classes. At least under my understanding of type flow analysis. I have looked into trying to do something with doctorjs but while I think the system should be capable enough if you write type invariant javascript but without class types the analysis isn't particularly useful and I didn't take the time to understand the code and try implementing classes for a particular library. In the meantime I've run across ebay's vjet, which is an eclipse plugin but haven't looked into how well it works or how much work it'd take to pull it out of eclipse and turn into something like golang. If ctags is good enough for you, be sure to use jsctags (part of doctorjs) since exuberant's js mode is bad.
grayrest
 
Posts: 12
Joined: Thu Sep 29, 2011 5:03 pm

Re: Intellisense

Postby jchannon on Wed Oct 05, 2011 5:38 pm

Thanks for the reply and I understand what you are saying however for frameworks like jQuery and node.js they have defined methods which they document.

So like Visual Studio has done there must be a way to infer types and then offer intellisense for the available object in the jQuery framework. So if you type $. the intellisense offers global methods but then when you do var arr = []; arr. it knows arr is an array and offers the methods for arrays.
jchannon
 
Posts: 11
Joined: Sun Oct 02, 2011 4:09 pm


Return to Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 36 guests