Visual studio muliline edit jump to end of individual words? - visual-studio

When I type SHIFT+CTRL+RIGHT, it jumps to the end of the next word and adds it to the selection.
With PyCharm, when I have multiple line selected, it will be smart and jump a different number of characters depending on the length of the word on the selected line:
However, on Visual Studio, it jumps to match the longest word in the selection. I can't imagine in what case this is useful.
Is there a way to have the jump matches the length of the word on the line, like in the first example?
I am using Visual Studio Community Version 16.4.2

Related

How to make the Visual Studio editor treat a piece of text as an atomic piece when deleting?

I am writing a Visual Studio extension. Is there a built-in way to make the visual studio editor treat a certain piece of text (or code) as a single unit? That is, you can only delete this piece of code at once, you cannot delete part of it. Also, can Visual Studio treat a piece of text as a single unit as far as moving the caret is considered? That is, if you are at the beginning of the text and you use the right arrow on the keyword, the caret will go to the end of the piece. This behavior exists with adornments that have non-zero span, however, I don't want to replace the text with an adornment in one case.

Visual Studio column selection - Select by word, not square

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

Visual studio - select word with hyphen

When you ctrl+click or double click a word in the Visual Studio text editor, it stops the selection at a hyphen. So, for example, you cannot select a full GUID with ctrl+click. Is there a way to remove the hyphen as a word separator?
There is an extension that solves this issue for visual studio. "Select Hyphenated" # marketplace.visualstudio.com
There is also a setting in vscode:
"editor.wordSeparators": "`~!##$%^&*()-=+[{]}\\|;:'\",.<>/?",
By removing the hyphen, double clicking selects whole hyphenated words.
I also removed the period and hash for selecting css classes and ids.

Convert virtual spaces into real tabs in visual studio

In Visual studio when I create a newline it sets a caret to the indent that I want. However it's not a real tab indentation until I will type any character at line. So all my empty lines are still fully empty (without '\t') and i want to make VS to convert this virtual indentation into real tabs.
I saw this question is pretty close to what I want but in differense from that I don't write an extension but search an existing solution. Though if there's no other way i will have to do it.

Can I create 'jump points' in visual studio 2005?

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.

Resources