Visual Studio Short Cuts - VS快捷键

Visual Studio提供快捷键很多,分类列举一二,以提高编辑效率

 

Ctrl + T 或者 Ctrl + 逗号

我们常用Ctrl + F去查找字符串,实际上,这个快捷键可以方便的帮我们定位到class, function, 行号等。

只要记住名字,使我们无需借助project explorer也可以快速定位到某个文件

 

 

Ctrl + ]

快速的在两个对应的花括号,或其他对应符号之间切换。

 

书签

可以帮我们建立书签,浏览书签,定位书签,
在一路F12追查代码时尤为有用。

Ctrl + K Twice to put a book mark
Ctrl + K, W to view all the book mark
Ctrl + K, N to go to next book mark. P to previous
Ctrl + K, L to delete all the book mark

 

 

格式化代码

格式化当前文档 : Ctrl + K,D

格式化选中区域: Ctrl + K, F

显示行前空白区域: Ctrl + R ,W (to show indent dots)

 

行相关

在当前行上方插入空行并移动光标:Ctrl + Enter

在当前行下方插入空行并移动光标:Shift + Enter

剪切当前行:在未选中文本状态下 Ctrl + X

复制当前行:在未选中文本状态下 Ctrl + C

 

导航

立即移动当前文档视野(而并非移动光标): Ctrl + 上箭头/下箭头

关闭所有窗口: Alt + W, L

最大化模式: Shift + Alt + Enter

回到上一个TAB页面: Ctrl + F6

 

注释

添加注释:Ctrl + K, C
取消注释:Ctrl + K, U

 

------- 以下来自自己的英文笔记,没时间翻译,以后更新  -----

Debug
Ctrl +Shift + F9 to remove all debug point

Shift + F9 at debug mode to show quick watch window

two ? at command or immediate window to show quick watch window

Code Snippet
ctor to create constructor

prop

propfull

cw = Console.WriteLine();

equals and press TAB to create equal method

try to create try block

tryf for try

Navi through Tabs
Ctrl + Alt + PageUp/Down to loop tabs

Ctrl + F6 : to go to previous tab

Ctrl + Tab : toggle between previous and current

Select
Ctrl + W to select current word

Alt + Shit + Down to select line

customize snippet
We need a extension Snippet Designer to extract and create snippet.

Ctrl + K, B to open Snippet Manager

Edit
Ctrl + D to copy and paste the line above

Ctrl + L = Shit + Del = Ctrl + X : to cut the current line

Avoid Distraction
Ctrl + M, M to collapse current code section

Shit Alt Enter to enter full screen mode

 

 

附名称大小写参照表一份

 

posted @ 2020-11-02 22:51  No5Meters  阅读(147)  评论(0编辑  收藏  举报