Coding Faster: Getting More Productive with MicrosoftR Visual Studio (閱讀筆記)

第一次用 iPad 上的 GoodReader看完一本電子書,GoodReader真是不錯用,可以註解,然後也可以裁切出要看的範圍,就不用每次都在拖那些空白了。進入正題,這本書主要是教一些Visual Studio的快速鍵為主,有些我已經知道的就不列出來了。下面只有列我之前沒在用的或是我覺得一定會用的~有時間的人可以自己去看看這本書,很快的,因為作者都截圖跟表格了。比較奇怪的是這本書的附錄之後還有很大的篇幅~


先介紹一個比較實用的東西,常常我在程式裡面會有 LoadSetting() 跟 SaveSetting() 這兩個函式

內容的東西大部分都剛好是相反的
ex:
LoadSetting:     tbMyName.Text = Settings.Default.MyName;
那在
SaveSetting:     Settings.Default.MyName = tbMyName.Text;

以前常常都是手動去複製貼上
其實VS的取代視窗可以用 Regular Expression 的方式
搜尋 {[^=]+}={[^;]+};
取代為  \2 = \1;

1. http://studiostyles.info 可以下載Theme。
2. devenv /ResetSettings [settings file]用途是在同一台電腦,上班的環境有兩台螢幕,回家只有一台螢幕,你就可以做兩個不同的捷徑,這樣就可以有不同的Window Layout。
3. Navigating Property Tabs in the Project Properties: Ctrl+PageDown, Ctrl+PageUp在專案的屬性視窗想要切頁籤的時候,我每次都用滑鼠按的,因為NB不好按Ctrl+PageDown
4. You can also see the template in the My Documents\Visual Studio \Templates\ItemTemplates\ folder.
5. 預設的Templates在這裡C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates,因為我的Project都要多一些其他的設定,所以就可以直接把這裡的改掉了。但我改了怎麼沒有用Orz
6. Cycle Through Your Open Tool Windows, Alt+F6
7. Closing Tool Windows, Shift+ESC
8. Expand and Collapse All in the Toolbox: * (expand all); / (collapse all) 這一個跟ListView的模式一樣
9. 在工具列上面可以打字,遞增式搜尋
10. Navigate Among Tabs in the Toolbox, Ctrl+[Up, Down] Arrow,這兩個快速鍵我一般是拿來做其他事情用
11. Auto-Hide All Tool Window, Alt,W, U,類似Eclipse 的 Ctrl+M的功能,但Visual Studio再按一次卻不會還原,遜掉了Orz
12. Moving Tool Windows Around with Your Keyboard, Alt+- (dock menu) 類似一般視窗的 ALT+Space功能鍵
13. It is sometimes cumbersome to type in a full command. You can use aliases to quickly use a command without having to type in the full command syntax. If you want a list of the current aliases, just open the Command Window (Ctrl+Alt+A) and type alias.
14. Navigate Open Document Windows, Ctrl+F6 (next); Ctrl+Shift+F6 (previous)
15. Open the File Menu Drop-Down List from Your Keyboard, Ctrl+Alt+Down Arrow
16. Search the Currently Selected String Without the Find Window,Ctrl+F3 (next); Ctrl+Shift+F3 (previous)
17. So now we are looking for “{bubba}{jones},” which creates tagged expression 1 (“bubba”) and tagged expression 2 (“jones”). At this point, it’s simply a matter of replacing with the expres-sions switched around (“\2\1”), and we get the following:
18. Make IntelliSense Transparent, 按住 CTRL,Sometimes when you are writing code, you find yourself in a situation where IntelliSense is covering up something you want to see
19. Insert a Blank Line Above or Below the Current Line, Ctrl+Enter (line above); Ctrl+Shift+Enter (line below)
20. How to Use Reference Highlighting, Ctrl+Shift+Down Arrow (next); Ctrl+Shift+Up Arrow (previous)
21. Moving or Selecting Between Matching Braces (C++, C# Only), Ctrl+] (move); Ctrl+Shift+] (select)
22. Word Completion, Ctrl+Space; Alt+Right Arrow
23. Using Smart Tags from the Keyboard,Ctrl+ . (period);Shift+Alt+F10
24. Replacing Text with a Box Selection, Shift+Alt+[Up, Down, Left, Right] Arrow
25. Compiler Directive, C# System.Diagnostics.Debugger.Break method:VB Stop command, C++ 沒有自己用 Macro 做
26. Extension: Visual Studio Color Theme Editor, XAML IntelliSense Presenter, Solution Explorer Tools, PowerCommands, CodeCompare, Regex Editor, Visual Studio Productivity Power Tools (這一個太強大了會跟我的Resharper衝)

留言

這個網誌中的熱門文章

好貴的東元冷氣維修--馬達啟動電容

台大醫院 婁培人 耳鼻喉科 就診

機車無法充電之整流器壞掉--$650