JavaScript code analysis in VS2010 - javascript

It is possible to enable a code editor helpers for .js files in Visual Studio 2010.
I am tasked to alter the existing JavaSript files, and I am having a hard time to even getting around the written codes, since VS editor treats JS as text. I think Notepad++ would do a better job in this case.
Consider a simple example in the image below:
When an opening braces are selected, the closing ones should also be highlighted so see the boundaries of the function.
The question is: Is there an extension, or some other add-in to VS to enable comfort javascript editing?

JScript Editor Extensions looks good

Related

How do you get an HTML element ID to autocomplete in VSCode JavaScript?

I'm trying to get intellisense to work with JavaScript in VSCode, but when I try to reference an HTML file in the project it doesn't recognize IDs.
In the picture you can see the same project works fine in Visual Studio.
Is there a way to get this functionality in VSCode?
Sadly, Visual Studio and VS Code are two completely different software's. Visual Studio is an IDE (Integrated Development Environment), this means it has more features than a normal text editor (for example VS Code or Atom). VS Code is a text editor, however you can install extensions to make it more into an IDE.
The best solution is to look at VS Codes market place and try and find an extension that will auto complete the HTML tags. I personally haven't found any extension for it.
Hope this helps, if you need any more advice or help DM me on discord CallumS005#9458 and I'll be happy to try and help.

Auto-format javascript code in RStudio Server

In RStudio it´s possible to autoformat R Code with CTRL+SHIFT+A (e.g. see this answer). Now my question is, how to autoformat javascript code in RStudio (e.g. if you are working on a shiny app).
The prettifyAddins package I've just made provides two RStudio addins for JavaScript files and more: an addin which only reindents the code and an addin which prettifies the code, e.g. it adds semi-colons when they are missing. I will submit it to CRAN soon.
Update
I updated prettifyAddins. It has now addins using the V8 package, and Shiny is not used for these addins, the prettified code directly replaces the current code.
Another possibility is my (freshly built) package aceEditor. It opens the Ace editor in the viewer pane of RStudio:
This provides a second source editor in RStudio. And many languages are supported.

Intellij idea Javascript formatting and highlighting

I am new to developing webapps in Intellij so this may be a simple question. How do I get it to properly display Javascript syntax when I am editing scripts within an HTML page. For example when I create an external file with a .js extension it properly formats the Javascript, but when I have in in-file Javascript function it fails to pick up on it and displays it as plain text. Is this a limitation of the community edition?
It is most likely a limitation of the comunity edition. If you go to the comparison page you will notice a few differences:

Indenting Javascript file line by line?

Is there any way in visual studio 2010 to indent javascript file line by line? I have got a big javascript file where all code is just on one line, so readability of the code is too much compromised.
Any hint? Thanks
One solution is to copy the entire file content in this site : http://jsbeautifier.org/ then press the Beatify JavaScript or HTML button, and you will get the js properly formated.
Now I suppose that Visual Studio could have a service identical to the sugested one, but I have not used it at all.
The PhpStorm that I am in love with it, has this option, to beautify the code if the code is compressed, as well allows me to define the look of the code format.
Also, as already described by #Andreas, you can use the plugin : http://visualstudiogallery.msdn.microsoft.com/41a0cc2f-eefd-4342-9fa9-3626855ca22a

visual studio inline javascript obfuscator

Does anyone know a plugin or tool that would obfuscate my inline javascript (in script block) in my .aspx pages when publishing? It wouldn't do any harm, if the plugin also removed xml comments/html comments, empty lines and and so on.
Its no security question ;) I just don't want users to be able to see comments and read the code straight away - and maybe have everything look a bit more pretty in the end.

Categories

Resources