How can I achieve multi-line editing in Visual Studio? For example in Sublime Text I could make it by CTRL + Mouse left button.

- 741
- 4
- 12
- 23

- 111
- 1
- 4
-
Possible duplicate of [Multiline editing in VSCode](https://stackoverflow.com/questions/30037808/multiline-editing-in-vscode) – Kirdus May 05 '18 at 23:49
-
2Can a question can, in itself, be an answer? In the cases of this question and [its inverse](https://stackoverflow.com/questions/27091044/is-there-a-way-to-do-multiline-editing-a-la-visual-studio-in-sublime), evidently yes. – Lance U. Matthews May 06 '18 at 03:28
8 Answers
I'm fairly certain you are wanting to click in multiple places in the code, say you have a few lines you copy and pasted over that have the same word that you want to change (without having to do a Find/Replace)
ALT + CTRL + Left Mouse Click in the locations you want to edit, then just start typing.

- 141
- 1
- 7
ALT+Shift + Down Arrow will do the trick from the keyboard

- 615
- 6
- 15
-
-
Can you update the answer to say what keyboard binding you have alt+shift+down arrow set to as I've lost the ability and I can't seem to find the binding that I need to set.. @JasonShave - perhaps you know the answer to my question? – Emma Middlebrook Nov 10 '21 at 19:21
-
In Visual Studio if you click Tools, Options, then search for 'keyboard'. In the "Show commands containing" search box, type "Edit.LineUp" and you should see "Edit.LineUpExtendColumn". This might be the one as it maps to Shift+Alt+Up Arrow and there is one for down arrow too. – Jason Shave Nov 11 '21 at 20:59
You can use ALT + LEFT MOUSE BUTTON and mark the lines you want to write to.
I hope that helps.

- 97
- 2
- 10
-
2Unfortunately it doesn't work.(Windows 10 here if it matters). – Frank Lee Mydear May 05 '18 at 23:32
-
-
2Nothing happens.Marks only one line of code. When I use ALT + Shift and Arrow Keys, it marks all lines of code. – Frank Lee Mydear May 05 '18 at 23:46
You can use Alt + Shift
shortcut.
First press Alt + Shift
then click mouse button on the first line.
Go to the last line then do the same.
This will mark all the part of one side. what ever you type will be reflected the marked spaces.
Do the same in the other side too.

- 2,415
- 18
- 30
Multi Edit Mode extension lets you simultaneously edit in more than one location in the VS editor. ALT+Click on different locations in your code to set multiple carets, and then type as you normally would.

- 26,641
- 3
- 64
- 66
Let's use Shift+Alt+↑ or ↓ buttons in any Source
Window.
Unfortunately, but Visual Studio
's multi-line editing is not as intellectually developed as in Sublime Text 3
.

- 741
- 4
- 12
- 23
You can do ALT + UP/DOWN arrow keys to select the lines you want to write on. Then, they'll all be edited at the same time. Hope that helped!

- 279
- 3
- 18
If you are looking for the Sublime Text 3/VS Code style editing, there's Select Next Occurrence, which supports the entire feature set.
Since e.g. Ctrl+D is bound to Debug windows in VS, you may need to set the shortcuts manually.

- 3,090
- 2
- 17
- 18