Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
309 views
in Technique[技术] by (71.8m points)

visual studio - Use Ctrl+Click to Select Word in VS Code

In Visual Studio, if you hold CTRL and click on word, it selects the entire word. If you drag, it selects text word-by-word.

I find this feature of Visual Studio very useful when I'm copy pasting small bits of code, since I can just keep holding CTRL, select words, and press C, X, or V to move stuff around.

In VS Code, you can't do this. Instead, CTRL+CLICK is bound to "Go To Definition".

Is there any way to match the behavior of VS Code with Visual Studio in this context?

question from:https://stackoverflow.com/questions/43428264/use-ctrlclick-to-select-word-in-vs-code

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

As @phuzi said in the comments you can use double click to select the word or double click and drag to select word to word (it will snap on the last character of each word). If you triple-click on a line or click on line num, it will select the whole line (with the invisible character at last ' ').
If you press CTRL + D it will select the word where the cursor is. Also if there are multiple instance of same word you can select them all one after another using CTRL + D.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...