Multiple select in Visual Studio?

2020-02-07 16:14发布

Is there a way to select multiple non-adjoining (totally separate) texts in VS? I can do it in MS Word by selecting the texts separately by holding the Ctrl button, like this:

enter image description here

My version is 11.

Edit: I'm not talking about Alt+Select block selection. Also I would love to see if there exist a technique in Notepad++.

12条回答
女痞
2楼-- · 2020-02-07 16:35

Update: MixEdit extension now provides this ability.

MultiEdit extension for VS allows for something similar (doesn't support multiple selections as of this writing, just multiple carets)

Head over to Hanselman's for a quick animated gif of this in action: Simultaneous Editing for Visual Studio with the free MultiEdit extension

查看更多
\"骚年 ilove
3楼-- · 2020-02-07 16:37

MixEdit extension for Visual Studio allows you to do multiediting in the way you are describing. It supports multiple carets and multiple selections.

查看更多
一纸荒年 Trace。
4楼-- · 2020-02-07 16:38

For Visual Studio Code

Got to this question because I was looking for a way to select multiple words with mouse click on VS Code, which should be achieved by using alt+click, but this keybinding wasn't working (I think it is something related to my OS, Ubuntu).

For anyone looking for something similar, try changing the key to ctrl+click.

Go to Selection > Switch to Ctrl+Click for Multi Cursor

查看更多
神经病院院长
5楼-- · 2020-02-07 16:44

Just to note,

MixEdit is not completely free.

"This software is currently not licensed to any user and is running in evaluation mode. MIXEDIT may be downloaded and evaluated for free, however a license must be purchased for continued use."

Upon installation and use, a popup redirects to webpage - similar to SublimeText's unlicensed software pop-up message.

查看更多
该账号已被封号
6楼-- · 2020-02-07 16:49

There is supposedly a way to do it now with Ctrl + Alt + Click but I use this extension because it has a bunch of other nice features that I use: https://marketplace.visualstudio.com/items?itemName=thomaswelen.SelectNextOccurrence

查看更多
Summer. ? 凉城
7楼-- · 2020-02-07 16:51

In Visual Studio 2019, you can put your caret on the right place and then press SHIFT ALT and . (dot). This will select the next occurrence.

查看更多
登录 后发表回答