Prevent Visual Studio to auto correct this - visual-studio-2013

I have the following line:
<input id="cbField{$idx}"
type="checkbox" value="{ID}"
{?checked}checked="checked"{Checked}"/>
<label for="cbField{$idx}">{Name}</label>
{?checked} is wrong, it should be {?Checked} with a Capital C.
When I copy 'Checked' and past it on 'checked', VS "correct" them both to 'checked'.
I work with dust.js so I'm not writing 100% "right of the bat" valid HTML and I'd like to prevent visual studio to make any single change to what I type
How can this be done?

I found it, it's in HTML/... Advanced : Format on paste.

Tools / Options / Text Editor / HTML / Advanced / Format on past
On my VS version

Related

Javascript blocks in Visual Studio with riot.js

Is there a way to have javascript block correctly displayed in Visual Studio when handling riot?
So we can use intelisence and all other neat features?
I've tried using <script type="text/javascript>` but that didn't help... what do you guys do?
Cause it's pretty bad every time we paste something in the <script> context, it re-formats everything to the left ... every single time :/
Turned out to be really simple...
Search in the Quick Launch (Ctrl + Q) [top-right of Visual Studio] for File Extensions and add a new extension for:
tag --> HTML Editor

IntelliSense: aria-valuemax and data-ng-style aaaargh?

While typing code in a Razor (.cshtml) file using Visual Studio 2013 (Update 4) with ReSharper 8.2.3 (updated by suggestion from this question), my IntelliSense is doing stuff that is driving me crazy. I am a heavy user of the IntelliSense+Tab key when typing to speed up my coding, but some common keywords keep defaulting to suggestions that aren't as intuitive as you'd think. Examples:
<input type="whatever" value="something" /> prefers aria-valuemax instead of value:
<input type="whatever" style="yada yada" /> prefers data-ng-style instead of style:
I know this is a niggling thing, but it is driving me nuts, and it seems to me that IntelliSense should be preferring value and style here simply because what I'm typing does not start with aria and data in the respective examples. Does anyone know how to turn this behavior off?
This is the AngularJS plugin for ReSharper. The latest version is a bit more sane with respect to item ordering and will choose style over data-hg-style. However, most of this goodness comes from ReSharper itself, and the latest version of the plugin requires ReSharper 9.1.

Visual Studio Format Document inserts tab after data-bind

cshtml files with more than one data-bind on a line get a tab (four spaces) insterted after the >data-bind="<. This happens when Visual Studio does "Format Document". And is therefore reproducible by Edit->Format Document.
Only the additional data-binds have this, so the 2nd and 3rd get spaces added while the first remains normal:
<input type="checkbox" data-bind="checked: Active" /><span data-bind="text: firstName"></span><span data-bind="text: lastName"></span>
Changes into:
<input type="checkbox" data-bind="checked: Active" /><span data-bind=" text: firstName"></span><span data-bind=" text: lastName"></span>
It's not a huge problem, stuff can be placed on seperate lines, but still annoying.
Edit: Since vs2013 I no longer have this problem. That also seems to have fixed another problem where vs would randomly decide to move my carret and type some spaces.
I am working with Visual studio 2012, and I don't facing this problem.
May be you could try to reset your VS settings.
If it doesn't work, I will post my settings.

Dim/hide logging lines of code in Visual Studio

Is there any way to make visual studio dim or hide/show on demand logging lines of my code?
We use a lot of logging in our project and it's harder to read code like this.
I would like it to be like this, for example:
Unobtrusive Code extension worked for me for Visual Studio 2019. It dims the opacity of log lines (and comments, which I disabled - I enjoy reading my comments). He did a quick update for the nuget package, and it works great.
https://marketplace.visualstudio.com/items?itemName=niklaskallander.UnobtrusiveCode
I use this. Hoping one day they will add color customization and line selection regex options as well:
https://marketplace.visualstudio.com/items?itemName=ElmarXCV.GrayLogLines
There is no way to do this from the standard Visual Studio IDE. In order to do this you would need to define a custom extension which recognized lines like this, tagged them with a specific format and have that format be colored a lighter color in the IDE
a "hackier" way would be to wrap all logging in a preprocessor directive like
#if DEBUG
Log.Info(........)
#endif
Visual-Studio will "dim" the code inside.
and have some kind of config header where you
#define DEBUG 0
Not the prettiest but its nice if you don't want debug code compiled into your Release binary
why don't you put your section within #region tag.
E.G:
#region Put some region name here for your reference
Your Code / Comment / Whatever
#endregion

Zend Studio keeps loading with-in a project folder. How do I get it to load so my top level elements are all my projects?

Yes I set "top level elements" to "projects"
Here is how it looks when I load my zend studio.
I want it to load so that all my projects are there instead of having to press that up button 20 times...
Find the file below to edit in your favorite text editor:
workspace.metadata.plugins\org.eclipse.ui.workbench\workbench.xml
In my case:
C:\Users\juliano\Zend\workspaces\DefaultWorkspace.metadata.plugins\org.eclipse.ui.workbench
And find the line:
<input factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/xxx" type="4"/>
In my case it was:
<input factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/Electrolux" type="4"/>
and replace it by
<input factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/" type="8"/>
And again have peace!

Resources