views:

1333

answers:

1

I use Visual Studio as my editor for .css and .js files.. It REALLY SUCKS especially with .js files since it insists on indenting them in a very weird way, but I find it convenient that the first alt-tab is always the browser instead of another editor, and that ctrl-tab is always either the code file or the css/js.

Anyways, in all its radiant wisdom it decides to check them for syntax errors as well and every time I compile my project it gives several "errors" that push down the real errors of the compilation, so every time I make a syntax error in a code file I have to scroll down through all the js/css errors to see what's wrong.

Examples of such errors (that aren't really errors) are:

Error   7   Validation (CSS 2.1): 'text-rendering' is not a known CSS property name.
Error   8   Validation (CSS 2.1): 'opacity' is not a known CSS property name.

The situation also got much worse recently, since it now keeps parsing a .js file as a .css file for some reason, so I get errors such as:

Error   1   Unexpected character sequence. Expected a selector for the style rule.  E:\Dev\anacletus\Static\set_focus.js    2
Error   2   Unexpected character sequence. Expected a property name for the " : " declaration. E:\Dev\anacletus\Static\set_focus.js    3
Error   3   Validation (CSS 2.1): 'set-focus' is not a known CSS property name. E:\Dev\anacletus\Static\set_focus.js    3

I even deleted that particular file from the solution (it's not there anymore anywhere), but it keeps parsing it anyway.

In short, how can I disable this feature?

+7  A: 

Enter the options through Tools > Options.

If it isn't checked, check the "Show all settings" box at the bottom of that window.

In the tree to the left, choose Text Editor > CSS > CSS Specific. Uncheck "Detect Errors".

Then, choose Text Editor > JScript > Miscellaneous. Uncheck "Show syntax errors".

You can also change how it indents each type of code too, in the various settings in those "Text Editor" sub-options.

Dave Ward
wow, thanks! :))
Andreas Bonini