Aptana and JavaScript/jQuery IDE - javascript

I'm using Aptana for JavaScript and jQuery.
My script files are not being outlined, but I understand that this is a known issue.
When editing JavaScript, is there a way to add simple editing short cuts like:
High light a block and comment /or uncomment block.
Getting intellisense to recognize Jquery-UI and other libraries?
And while I’m here and asking what about the outliner and created code?
a. What allows JQuery to be recognized and my scripts to not be recognized?

Answers to 2. and a.
Aptana cheats. It knows jQuery and uses some local heuristics to guess when something is a jQuery collection, but it does not do data-flow analysis on the javascript to determine the type. That's why jQuery shows up, but jQueryUI and your code don't.

Related

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:

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.

Vim: inline JavaScript syntax highlighting better than on a separate file

When editing JavaScript inside a script tag the syntax highlighting is much better than when editing myFile.js.
Is there a way to have the same syntax highlighting in a separate file as you have inside a script tag?
I already tested both the stock javascript.vim syntax file and this alternative one:
http://www.vim.org/scripts/script.php?script_id=1491!
edit: please check screen shot:
Left side is inside script tags and :setfiletype html.
Right side is plain javascript with :setfiletype javascript
I know it's been a couple of months, but I wonder if you've found a satisfactory answer yet?
I found the following via :help syntax within vim:
JavaScript and Visual Basic embedded inside HTML documents are highlighted as
'Special' with statements, comments, strings and so on colored as in standard
programming languages. Note that only JavaScript and Visual Basic are currently
supported, no other scripting language has been added yet.
This seems to explain why everything that is does not have its own coloring in javascript.vim is colored "Special" when embedded within HTML. This seems to include variable names, function and method names, and so forth. I like it, too, because it separates variables, etc, from punctuation, etc. Much easier to see that your code is correct.
My vim JavaScript highlighting is awesome, this is my setup:
syntax on
filetype plugin on
syntax enable
au BufRead,BufNewFile *.js set filetype=javascript
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
with the following js-related bundles
jslint
and no specific syntax files
My colorscheme (molokai) takes care of the rest
Hope this helps you
Use vim-javascript. It works pretty well.
In my case installing jelera/vim-javascript-syntax did the trick since vim-javascript plugin by itself didn't apply a nice color syntax. If your language of choice is Javascript (as in my case) I recommend you to follow this great guide. Hope this helps!

Aptana //novalidate option

I'm writing Processing.js code using Eclipse (with the Aptana plugin), and I'm a little confused by this option in the Javascript preferences:
Enable error filtering inside //novalidate comments
Using Processing.js allows me (and occasionally forces me - for example, it uses the Java "void" instead of the Javascript "function" for method declarations) to do some funky things to javascript syntax that the validator doesn't like. I've got a bunch of error messages that I'd like to silence, but I'd rather use the Eclipse editor because the rest of my site is there.
I've tried sticking "//novalidate" before, after, after the semicolon on the same line, and even at the beginning of the file, but it has no effect. I've also tried adding exclude rules in Preferences -> Validation, but that doesn't seem to do anything, nor does turning off "Javascript problems" in Problems -> Configure Contents... (which I'd like to avoid, because I'm doing regular javascript elsewhere on my site). I can't find any documentation for "//novalidate" on the Aptana website - does anyone have any idea how to use this properly?
Thanks in advance.
Have you tried Aptana Support methods?

Can I have the Code Editor for C# in Visual Studio 2008 show a line separating methods?

Sorry for the dumb question, but...
I'm moving from VB to C# and this is really bugging me.
Is there a way to convince VS 2008 to draw a line separating my methods like it does for VB?
I'm really used to those, and i'm used to doing
//-------------------------------------------------------
myself in Javascript.
I'm hoping I won't have to do it manually in C# too.
Any pointers?
Thanks
Not out of the box. There may be third-party apps which will do this like CodeRush or something like that.
But my advice:
Get out of the habit of putting lines in between your procedures. Comments without meaning are evil.
You can do this for free (assuming you are using Visual Studio 2008 Standard edition or higher).
Install the free CodeRush Xpress. Then install the free plugin DrawLinesBetweenMethods
Copy the DLL to this location - C:\Program Files\Developer Express Inc\DXCore for Visual Studio .NET\2.0\Bin\Plugins.
This will producethe effect described here: Lines between methods in the C# editor (CodeRush/DxCore plugin)
If you don't want CodeRush Xpress then an alternative is to install the free DXCore extensibility engine and then install the above plugin. If you install DXCore you are also able to make use of a number of other useful plugins, most of which can be found at the same site as DrawLinesBetweenMethods.
Why not add bona fide summary comments to methods? Any number of tools can create some form of documentation out of this.
Also the IDE can collapse the method so unsure of the gain of this line. Wouldn't #regions be of more interest? (rhetorical question)
VS10 will allow you WPF inline and so if you can wait you could even draw a sunset between two methods!
Devexpress.com makes CodeRush, which has some visualizations.
Or use #region to separate any regions of code. For example, I separate overrides, methods, properties, events and objects, but you could wrap your methods in #region to clearly separate each one (and collapse them when not in use.)
This isn't what you asked for, but it is a great alternative.
Not quite what you are looking for, but using Resharper it's possible to set up a custom type members template that would surround every method in a file/project/solution with a region whenever you pressed a shortcut.
Your other Resharper option would be to create a custom surround template, which would let you select a block of text and chose surround with->YourCustomSurround to place your comment block at the top.
This should easily be possible in Visual Studio 2010 due to the extensible, WPF-based text editor.
A note regarding your comment:
separators [...]
allow me to skim through the code
REALLY fast. [...] I
can very quickly jump to the next [method].
What I see a lot, is that people forget about the two dropdown list at the top of the editor window (listing the classes of the current file and the class members of the current class). It allows navigating to class members very quickly.

Categories

Resources