Is there a good javascript plugin for visual studio?

前端 未结 5 1873
無奈伤痛
無奈伤痛 2021-02-01 05:29

I think that Visual Studio\'s biggest let down is the Javascript editor. I have been told to use Aptana as an editor for my javascript files, but I would prefer to stick with v

相关标签:
5条回答
  • 2021-02-01 05:42

    I'd really like to recommend Webstorm. It does not! treat your JS as text files.

    Its a full blown JS editor and has become my favourite JS editor working in parallel with VS to handle my server side stuff.

    • WS has actual object intellisense across JS files. That means when I press . (dot) it shows me the functions on that objects, even if its located physically in another file.

    • It will recognize my objects (or their type if you will) created in other JS files referred to in the file I'm working on.

    • I have 'Find usages' on JS functions

    • I have 'find all references' on JS object / function / class / variable or whatever you want to search on. In the end its all objects but Webstorm knows this.

    • If I change the short/cut to F12, I can press F12 on my function call and it will jump to the implementation of that JS functon. Even if its located in another file.

    • Ofc. you have code folding and colouring, extract method and other neat code re factoring, overview creating tools.

    Oh. And by the way. I'd like to kill off a rumour going around in the cloud on forums I come across from time to time, looking for better ways to handle JS.

    reSharper DO NOT SUPPORT JAVASCRIPT! A little piece of me dies every time I read some guy repeating what he saw on the reSharper site. It may have a some poor intellisense and some low level syntax check, but that has nothing to do with support. Notepad++ supports JS better than VS in my opinion.

    Münster

    0 讨论(0)
  • 2021-02-01 05:46

    There's a couple recent plugins that may be helpful :

    From Microsoft :

    JScript Editor Extensions

    • Brace Matching
    • Outlining / Cold-folding
    • Current Word Highlighting
    • IntelliSense Doc-Comments Support

    JSEnhancements

    • Outlining and matching braces highlighting

    (I wouldn't think installing both of these is a good idea - and the Microsoft plugin has more features so try that one first)

    0 讨论(0)
  • 2021-02-01 05:48

    VS is a pretty good IDE (especially when coupled with Resharper) but not so hot with Javascript. The debugger is good and there's the JSLint plugin but other than that I'm not sure. Aptana (based on Eclipse) is an excellent javascript IDE but it doesn't like it much when the javascript is embedded in aspx files (unless they updated the support recently). So far I'm not sure there's an ideal .net platform IDE for both client and server side stuff just yet.

    Update: Resharper 6 added pretty good JavaScript support - so now I'd recommend that combination if you're doing a lot of debugging across client and server at the same time. If you're focussing on pure client code then I find WebStorm to be an excellent JavaScript/HTML IDE - even better than Aptana.

    0 讨论(0)
  • 2021-02-01 05:49

    Don't forget to grab Chirpy to handle minifying your scripts in VS.

    0 讨论(0)
  • 2021-02-01 06:04

    If you use Visual Studio, add the

     /// <reference path="myOtherJsFile.js" /> 
    

    directive at top of your js files and install Web Essentials you get pretty decent (but not perfect) intellisense, go to definition by using F12 and find all references (sort of..) by using SHIFT+F12

    0 讨论(0)
提交回复
热议问题