您的位置:首页 > 其它

Tips and Tricks for the Visual Studio .NET IDE

2006-08-10 16:56 651 查看

1. Record and play temporary macro

Ctrl+Shift+R
to record a new temporary macro. Press
Ctrl+Shift+R
to stop recording.
Ctrl+Shift+P
to play the recorded macro.

This works similar to *recording* in Vim. If you think you are going to be repeating a set of keyboard keys, then record them once and play them each time after.

2. Multiple copy/pastes

Ctrl+Shift+V
cycles through the clipboard ring. You can copy/cut multiple times from one area of code, then go to another area and paste them one after another.

3. Drag and drop code snippets

The Toolbox
(Ctrl+Alt+X)
window has multiple tabs. You can drag and drop code onto this window and copy it elsewhere. Some tabs do not allow dropping code into them; those that allow will have the appropriate icon. The General tab works for me.

4. Previous cursor positions

Ctrl+-
i.e. Ctrl + Hyphen. This cycles you through the code positions you visited.

Ctrl+Shift+-
to navigate in the opposite direction.

5. Incremental search

To incrementally search for text as you type, first press
Ctrl+i
. Then type the word you want to search. Hit backspace to clear a character and enter to finish. Pressing F3 after this will work as usual, i.e. search for the next occurrence of previous search.

Ctrl+i
-
Ctrl+i
works like F3.

6. Matching brace/comment/region/quote

Ctrl+]
takes you to the matching brace. It also takes you to the matching comment, region or quote depending on what is at the cursor now.

7. Vertical block selection

Press Alt and then select the area you want with your mouse.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: