Has anyone ever seen behavior like this in the Visual Studio 2010 Work Item editor, and found a solution:
The odd outlining of the upper controls is not a big deal, but the lower sections consist of several tabs that are completely invisible. They exist, and can be tabbed through, but you simply cannot see them.
This issue seems to crop up randomly. Sometimes I will open a work item and it will render like this, sometimes it will render correctly. Sometimes simply closing and reopening the work item will correct the issue, sometimes it won't.
Related
I usually use the CTRL+M CTRL+O to collapse sections or regions in my cs files in Visual Studio 2017. This keyboard shortcut is also working nicely in my JSX files. However, it's NOT working in JS files.
Interestingly, VS 2017 is able to see and understand functions, even sections within functions such as if blocks, etc. As you can see in image below, it also offers me those +/- icons to collapse them. Using the mouse, I can collapse them but my keyboard shortcut is not working.
How do I get VS 2017 to collapse everything to definitions in JS files using keyboard shortcuts?
The cause of this behaviour seems to be the use of the arrow-function - if you change that to a regular function-definition, the section will collapse using Ctrl+M Ctrl+O ('Collapse to definitions') like you expect it to.
This will, however, cause you to lose the perks of the arrow-function, which is less than optimal, especially when used in conjunction with promises.
What exactly is causing this, however, I haven't been able to discern, and all attempts of fixing it have so far proven futile.
Here's an example of how your outline should work as expected:
return function (dispatch) { fetch('/api/accounts/members/search', fetchOptionsPost(request))
.then(function(response) {
if(response.ok)
{
...
}
});
Can anyone confirm whether or not this behaviour occurred in VS2015?
Cheers
Edit 1: Ctrl+M Ctrl+L switches all outlines (not just definitions), which seems to include arrow-functions as well. You might have to press it twice, though, because as soon as a single item is collapsed, it expands everything.
Which begs the question whether this is not a bug, but indeed a feature, depending on whether or not you view the arrow-function as a 'definition' or not.
In Visual Studio 2013 Professional, the keyboard shortcut which is supposed to toggle to the previous tab, bound through Window.PreviousTab, seems to be toggling the Design/Split/Source views:
I went ahead and tried to isolate the problem by removing everything connected to the default keybindings of CtrlPage Down and CtrlAltPage Down. I also completely removed all keybindings for Window.PreviousTab and Window.NextTab so that nothing changes the windows.
I then bound CtrlTab to Window.NextTab and it worked fine for going to the next tab. Then I removed that and bound CtrlShiftTab to Window.PreviousTab and it toggled the Design/Split/Source view instead of the tab. I removed that and bound it to CtrlTab and it had the same effect. There are no other bindings using CtrlTab or CtrlShiftTab.
What is causing this, and how can I fix the problem? Is it a bug?
The only extension I have is PHP Tools for Visual Studio.
I had to look for it for a while, this was intentionally removed. For a good reason, this is legacy. It didn't get any love at VS2010, just the minimum to still make it functional, WebForms is not Microsoft's priority. Very high odds that you can't fix this and the keybinding was hard-coded in the extension.
But don't take bad news from an SO user, nobody ever likes that, get it from horse's mouth. Also a basic way they find out what their customers care about. Post the issue at connect.microsoft.com
I want to be able to move the cursor (not move the line of code) in the text editor up a block or down a block by pressing <ctrl>+<uparrow> or <ctrl>+<downarrow>. In jEdit, Leafpad, etc, this just works out of the box. I do not want to move an entire page at a time, just simply go to the start or end of the text block that I happen to be on.
Specifically, I want this, but for VS 2012 (which no longer has macros):
keyboard shortcut to move from one code block to another in VS2008
I've seen these posts, and they are not what I'm after; I do not want to move code, I want to move the cursor to the top or bottom of the block I happen to be on.
Visual Studio: hotkeys to move line up/down and move through recent changes
Visual Studio - Scroll AND move cursor
I have checked in ReSharper as well, and cannot seem to find an answer there.
Does anyone know of an add-in that provides this functionality?
Bind them to Edit.PreviousMethod and Edit.NextMethod in the Options->Environment->Keyboard?
I removed everything that was bound to these shortcuts, then bound it to Edit.PreviousMethod and Edit.NextMethod. This put the focus on the method box in the editor, but then you have to press enter to get it to navigate to that method.
The best I could find was using ReSharper, which I was trying to avoid. However, I'm a minimalist and ReSharper got in my way, I was leaving it toggled off almost all the time, so I uninstalled it.
I believe it was ReSharper.MoveToNextMethod or .NavigateToNextMethod, but I have uninstalled it so I'm going on memory. Using it, it would jump to the beginning of the previous or next method, which was not quite what I was looking for, but better than nothing.
Edit: I gave up. I moved to .Net Core for c# code and do all my editing outside of Code, using text editors that employ common keyboard shortcuts like Geany, jEdit, etc.
When I'm editing an aspx file in Visual Studio, Intellisense is always wrong after i manually enter a "style" attribute.
Intellisense shows correctly when I start they "style" attribute:
However, when I end the style attribute, I expect Intellisense to stop displaying elements for "style", and show me normal ASP.NET control related elements. But, it continues to display "style" elements:
Since the "style" attribute has ended, I would expect the "normal" ASP.NET Intellisense to show up, like it does before the style attribute:
Am I missing something incredibly obvious? My workaround has always been just to write out the style attribute last, but it's pretty darn annoying.
I don't think you're missing anything incredibly obvious. It looks like this bug has existed since at least Visual Studio 2008.
I hadn't noticed this behaviour, probably because I use ReSharper which provides its own intellisense functionality.
The workarounds seem to be:
Put the style attribute at the end so you don't have to worry about it (as you suggested)
Press Esc and then Ctrl + Space to reinitialise the intellisense
Just press Space a couple of times after the closing quote and it eventually switches back to the correct context.
You could lodge a bug with Microsoft Connect but I have had little success there myself.
I have a weird situation on a winform project.
I have user control (with 600 lines of code around) with a datagridview. I change de ColumnHeaderStyle of the font and save it. After I save the file I close it and open again, the changes were not saved (although the asterisk is dissapeared), because the ColumnHeaderStyle is back to the former value. This is driving me crazy because I cannot change any visual thing in the Designer.
Any clue?
Thanks in advance.
I've had occasional very strange behaviour with VS2008 developing WinForms apps too. Mostly designers that won't display (even though nothing has changed), but I've had cases of disappearing controls, too (and hence compilations that won't complete since code then refers to controls that are no longer being created). All very irritating.
Assuming that you've done all the standard things, like Cleaning the solution (on the Solution's context menu), deleting all the relevant Bin and Obj folders (no idea why this would cures VS weirdnesses, but it sometimes does) and rebuilding (ensuring that the Designer for your user control is closed when you rebuild)...
... you might try looking through the designer code for some strange 'bonus' controls that apparently have nothing to with you.
In one particularly intractable case, I eventually noticed some controls with names like Button_01, Button_02, etc, whose origin I couldn't identify. They were being defined but not instantiated, and not being added to any controls collections, and I just deleted all references to them.
When I recompiled, they didn't come back, and VS was behaving itself again.
I can't explain it, but it worked that time, and I offer it as an example of VS gremlins that seem to have rather irrational solutions.
Maybe it was just a strange planetary arrangement that did it, I guess I'll never know.