工欲善其事必先利其器:用的过程中有意识地整理自己的使用习惯并加以改进以提升使用效率,忌贪多求全,够用即可
vs2015 community 自带快捷键,没有安装resharper
编辑
ctl + k, ctl + f
对一段代码进行格式化
ctl + backspace
向前删除一个word,以前的做法是不断backspace,或者用Shift+方向键选中后再backspace
ctl + delete (用的不多)
向后删除一个word
alt + 上下方向键
行移动;重构时块内的变量定义要放到外面去
ctl + enter
上面开启一行
ctl + shift + enter
下面开启一行 (shift往往有反着来的意思)
浏览
ctl + ], ctl + s
在solution窗口定位当前编辑文件,对于随时查看文件结构非常有用
ctl + ]
跳转到括号匹配
ctl + shift + ]
选择括号内的文本
ctl + ,
全局查找
ctl + f2, tab, tab
查看当前类的字段属性和方法;用ctl + ,不方便,找过但貌似没有更好的方式
task(//TODO: 02)
在看Prism样例工程(Commanding QuickStart)时,里面用任务的方式,来定位若干个重要的步骤
https://msdn.microsoft.com/en-us/library/ff921082(v=pandp.40).aspx1
2
3
4
5
6
7private bool CanSave( object arg )
{
//TODO: 02 - The Order Save command is enabled only when all order data is valid.
// Can only save when there are no errors and
// when the order quantity is greater than zero.
return this.errors.Count == 0 && this.Quantity > 0;
}
可以用task list将所有todo显示出来
bookmark
书签也能完成上述的功能
可以用bookmark list将所有bookmark显示出来
参考
Visual Studio shortcut keys
http://www.dofactory.com/reference/visual-studio-shortcuts
Visual Studio 2015 keyboard shortcuts
http://visualstudioshortcuts.com/2015/
Productivity Power Tools
https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProductivityPowerTools
http://www.cnblogs.com/stg609/p/3713831.html
https://github.com/Microsoft/VS-PPT
常用快捷键的动画演示
http://blog.chenxu.me/post/detail?id=0543017f-1c98-4bd6-b87c-8bd19b4d752c