I am not sure this is SO or programmers question, If not let me know / remove this.
In VS 2010 when commented-out partial row, it would comment with /**/ the select string.
In VS 2012 when commented-out partial row, it would comment-out the entire row.
If I'd want to comment-out the entire row - i would comment out the entire row and would not select part of it.
Is it fixable ?
This is the commenting:
VS 2012 behavior (the annoying behavior):
VS 2010 behavior - the one i want to keep..
Related
This seems like something I would have found hundreds of topics on. Yet I didn't find a single one. I wonder if no one cares or if I just overlooked something obvious.
In Visual Studio when you select a column and want to select the word your cursor is at in each line, when you do CtrlShift+(ARROW KEY), then it doesn't select by word as it SHOULD, but instead it selects a square.
BAD BEHAVIOUR (which VS has):
GOOD BEHAVIOUR (which would be expected, and is in every other IDE):
The Visual Studio ALT select is rendered useless in half the cases, actually in every case where you don't have the "coordinates" precisely the same on every line.
EDIT
I seem to have to explain why the VS behavior is bad, people apparently consider it ok. So the problem is that when you column select in VS, and you have it exactly like in the example, or even without tabs, you'd copy some =, though they won't be everywhere.
If you select a column like VS Code or JetBrains has it, you'll just copy WHAT IS NEEDED and that OBVIOUSLY being just the words in the column.
I have a solution for you, but you may not like it. It's using the new Multi-Caret Support in Visual Studio 2017.
Here is my example code where I want to copy only the property names (sorry for lack of inline images):
Multi-Caret Code Example
Using Ctrl + Alt + Click to click and add a caret to the end of each word. (If you screw up and click somewhere you didn't mean, like I do many times, then reclick to remove that caret and click on the correct spot.)
Multi-Caret End of Line
Now hold Ctrl + Shift and hit the ← Left Arrow. This will select to the beginning of the current word on each line.
Multi-Caret Word Selected
Copy/paste as you wish
I hope this is okay to ask on SO, I'm not sure. I apologize if it shouldn't be here.
I reinstalled Visual Studio Professional 2015 yesterday due to a few issues I was having. With the new installation, my line numbers have a very wide section where the mouse reverses direction and select the entire line if clicked. I don't recall this area being so wide on any of my previous installations of VS2015; I know it was there in the first place. Is there a way to disable this?
This is the area where this happens, boxed in green. It's much wider than the line numbers fill (only 147 lines in this file).
There are two "margins" available in Visual Studio 2015: Selection and Indicator available under Tools > Options > Text Editor > General > Display. Turning these off remove some, but not all of the "extra space" and the feature of highlighting an entire line is still there.
If you want to turn them off because the extra space is bothersome, keep in mind you will not be able to see breakpoints unless "highlight current line" is checked.
I am working with a visual studio 2005 project with several thousand lines of code.
When I am looking at an IF statement in the code is there anyway to jump to the corresponding ELSE part without scrolling through hundreds of lines of code? I can't use goto as the line numbers will change all the time. If I can't automatically jump to the else part of an if statement, can I set up something to allow me to tag the else part and then go to that tag in visual studio?
You can use Ctrl+] to jump to the matching brace or parenthesis. So you can place your cursor on the brace of the if statement and press the shortcut to go to the end of the block and thus directly in front of the else.
Another option would be to set bookmarks with Ctrl+B, T. Those move when the line moves as well and you can jump between them with Ctrl+B, N and Ctrl+B, P.
I'm using Productivity Power Tools' Highlight current line feature. However, I'd also like to highlight the current column (i.e. have a vertical highlighting bar).
How can I do this?
I don't think it's possible. How could you have a common highlight column when the font is not Fixed.
Anyone knows if this is possible? I tried it in vs 2005 and 2008 and it doesn't do that. IMO this would be a very useful feature when I know I want to select the last item or an item that's closer to the end of the IntelliSense list.
It's not possible. I hit Page Down repeatedly to get to the last item if absolutely needed. Normally I just hit the first letter of what I need next, then select it.