VS代碼生成工具ReSharper使用手冊:配置快捷鍵(轉)


一、快捷鍵

原文:http://blog.csdn.net/fhzh520/article/details/46364603

VS代碼生成工具ReSharper提供了豐富的快捷鍵,可以極大地提高你的開發效率。

 

配置單個鍵盤快捷鍵

1、在主菜單上,選擇Tools | Options

2、在導航視圖中選擇Environment | Keyboard

3、在命令列表中,選擇啟動ReSharper的命令名稱。瀏覽列表以查看或者編輯ReSharper的特定操作的鍵盤快捷方式。

在鍵盤快捷方式間切換或者恢復到當前選定方案的默認狀態

1、在主菜單上,選擇ReSharper | Options

2、選擇Environment | Keyboard and Menus

3、在Keyboard and Menus選項卡上,選擇 Visual Studio, ReSharper 2.x 或 IntelliJ IDEA或 None,點擊Apply Scheme。如果你選擇None,你可以在Visual Studio的本地選項菜單中定義任意一組自定義快捷鍵(Tools | Options | Environment | Keyboard) 。

完整的快捷鍵列表

代碼分析(Code analysis)

Command Shortcut
(Visual Studio)
Shortcut
(IntelliJ IDEA/ReSharper 2.x)
Toggle code analysis in the current file Ctrl+Shift+Alt+8 Ctrl+Shift+Alt+8
Go to next code issue (error, warning or suggestion) Alt+PgDn F12
Go to previous code issue (error, warning or suggestion) Alt+PgUp Shift+F12
Go to next error Shift+Alt+PgDn Alt+F12
Go to next error in solution Shift+Alt+PgDn Alt+F12
Go to previous error Shift+Alt+PgUp Shift+Alt+F12
Go to previous error in solution Shift+Alt+PgUp Shift+Alt+F12
Inspect this Ctrl+Shift+Alt+A Ctrl+Shift+Alt+A
View type hierarchy(查看類型的層級) Ctrl+E,H Ctrl+Alt+H
Inspection Results window Ctrl+Alt+V Ctrl+Alt+V

編碼援助(Coding assistance)

Command Shortcut
(Visual Studio)
Shortcut
(IntelliJ IDEA/ReSharper 2.x)
Show action list Ctrl+R,W Ctrl+R,W
Paste multiple   Ctrl+Shift+V 
Code cleanup Ctrl+E,C Ctrl+Alt+F 
Silent code cleanup Ctrl+E,F Ctrl+Shift+Alt+F
Symbol code completion Ctrl+Space Ctrl+Space
Smart code completion Ctrl+Alt+Space Ctrl+Shift+Space
Import symbol completion Shift+Alt+Space Ctrl+Alt+Space
Complete statement Ctrl+Shift+Enter Ctrl+Shift+Enter
Parameter information Ctrl+Shift+Space Ctrl+P
Quick documentation Ctrl+Shift+F1 Ctrl+Q
Insert live template Ctrl+E,L Ctrl+J
Surround with template Ctrl+E,U Ctrl+Alt+J
Create file from template Ctrl+Alt+Insert Ctrl+Alt+Insert
Generate code Alt+Insert Alt+Insert
Move code up Ctrl+Shift+Alt+Up Ctrl+Shift+Alt+Up
Move code down Ctrl+Shift+Alt+Down Ctrl+Shift+Alt+Down
Move code left Ctrl+Shift+Alt+Left Ctrl+Shift+Alt+Left
Move code right Ctrl+Shift+Alt+Right Ctrl+Shift+Alt+Right
Extend selection Ctrl+Alt+Right Ctrl+W
Shrink selection Ctrl+Alt+Left Ctrl+Shift+W
Select containing declaration Ctrl+Shift+[ Ctrl+Shift+[
Duplicate a line or selection Ctrl+D Ctrl+D
Comment with line comment Ctrl+Alt+/ Ctrl+/
Comment with block comment Ctrl+Shift+/ Ctrl+Shift+/

導航和搜索(Navigation and search

Command Shortcut
(Visual Studio)
Shortcut
(IntelliJ IDEA/ReSharper 2.x)
Go to type Ctrl+T Ctrl+N
根據文件名定位 Ctrl+Shift+T Ctrl+Shift+N
Go to file member Alt+\ Ctrl+F12
Go to symbol Shift+Alt+T Ctrl+Shift+Alt+N
Navigate To Alt+` Ctrl+Shift+G
Go to type of symbol Ctrl+Shift+F11 Ctrl+Shift+T
跳轉到定義處 F12 Ctrl+B
跳轉到實現類 Ctrl+F12 Ctrl+Shift+Alt+B
Go to base symbols Alt+Home Ctrl+U
Go to derived symbols Alt+End Ctrl+Alt+B
Go to usage Shift+Alt+F12 Ctrl+Alt+F7
Go to containing declaration Ctrl+[ Ctrl+[
Go to next member/tag Alt+Down Alt+Down
Go to previous member/tag Alt+Up Alt+Up
Find usages Shift+F12 Alt+F7
Find usages (advanced) Ctrl+Shift+Alt+F12 Shift+Alt+F7
Highlight usages in file Shift+Alt+F11 Ctrl+Shift+F7
Go to previous usage Ctrl+Alt+PgUp Ctrl+Alt+Up
Go to next usage Ctrl+Alt+PgDn Ctrl+Alt+Down
Remove highlighting of usages Esc Esc
View recent files Ctrl+, Ctrl+E
View recent edits Ctrl+Shift+, Ctrl+Shift+Alt+Backspace
Go to previous edit Ctrl+Shift+Backspace Ctrl+Shift+Backspace
Go to related files Ctrl+Alt+F7 Ctrl+Shift+Alt+G
View bookmarks Ctrl+` Ctrl+`
Go to a numbered bookmark Ctrl+[numeric key] Ctrl+[numeric key]
Set/remove a numbered bookmark Ctrl+Shift+[numeric key] Ctrl+Shift+[numeric key]
Find Results window Ctrl+Alt+F12 Ctrl+Alt+U
File structure Ctrl+Alt+F Ctrl+F11
To-do items Ctrl+Alt+D  
Stack Trace Explorer Ctrl+E,T Ctrl+Shift+E
Locate in Solution Explorer Shift+Alt+L Shift+Alt+L
Analyze references Shift+Alt+Y Shift+Alt+Y

重構(Refactorings)

Command Shortcut
(Visual Studio)
Shortcut
(IntelliJ IDEA/ReSharper 2.x)
Refactor this Ctrl+Shift+R Ctrl+Shift+R
Rename Ctrl+R,R F2 or Shift+F6
Move Ctrl+R,O F6
Safe delete Ctrl+R,D or Alt+Del Alt+Del
Extract method Ctrl+R,M Ctrl+Alt+M
Introduce variable Ctrl+R,V Ctrl+Alt+V
Introduce field Ctrl+R,F Ctrl+Alt+D
Introduce parameter Ctrl+R,P Ctrl+Alt+P
Inline variable/method/field Ctrl+R,I Ctrl+Alt+N
Encapsulate field Ctrl+R,E Ctrl+R,E
Change signature Ctrl+R,S Ctrl+F6

單元測試(Unit testing)

Command Shortcut
(Visual Studio)
Shortcut
(IntelliJ IDEA/ReSharper 2.x)
Run unit tests Ctrl+U,R Ctrl+T,R
Debug unit tests Ctrl+U,D Ctrl+T,D
Run all tests in solution Ctrl+U,L Ctrl+T,L
Run current test session Ctrl+U,Y Ctrl+T,Y
Repeat previous test run Ctrl+U,Y Ctrl+T,Y
Append to test session Ctrl+U,A Ctrl+T,A
Create new test session Ctrl+U,N Ctrl+T,N
Unit Test Explorer Ctrl+Alt+U Ctrl+Alt+T
Unit Test Sessions Ctrl+Alt+T Ctrl+Alt+R

工具窗口(Tool windows)

 

 

Command Shortcut
(Visual Studio)
Shortcut
(IntelliJ IDEA/ReSharper 2.x)
File structure Ctrl+Alt+F Ctrl+F11
Find Results window Ctrl+Alt+F12 Ctrl+Alt+U
Hierarchies window Ctrl+Alt+H  
Inspection Results window Ctrl+Alt+V Ctrl+Alt+V
Stack Trace Explorer Ctrl+E,T Ctrl+Shift+E
Templates Explorer window Alt+R,P Alt+R,P
To-do items Ctrl+Alt+D  
Unit Test Explorer Ctrl+Alt+U Ctrl+Alt+T
Unit Test Sessions Ctrl+Alt+T Ctrl+Alt+R
Close recent tool Ctrl+Shift+F4 Ctrl+Shift+F4
Activate recent tool Ctrl+Alt+Backspace Ctrl+Alt+Backspace

 

 二、常見問題

找回Alt+Enter快捷鍵

打開VS的鍵盤設置,搜索Enter找到:ReSharper_AltEnter,然后直接分配Alt+Enter給它就OK了,注意剛開始我怎么設置都不行,之后才發現這個快捷鍵盤被設置為了兩個VS用處,一個全局的一文本編輯器,我們當然是讓它作用於“文本編輯器”,按下Alt+Enter后點擊“分配”,然后確定就OK了

 

禁用對某種文件的檢測

單獨對cshtml關閉Reshaper,具體操作如下:

菜單>Reshaper>Options…, 然后展開Code Inspection, Elements to skip中的File masks中添加*.cshtml, 這樣在再次打開cshtml文件時就不會受到Reshaper的影響了

 

原文:https://www.cnblogs.com/chsword/p/visualstudio_disable_resharper_code_inspection.html

 

 

相關推薦:

https://www.cnblogs.com/ShaYeBlog/p/3554253.html

https://www.cnblogs.com/luminji/p/3285505.html

http://www.360doc.com/content/16/0411/19/7014874_549790915.shtml

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM