2012-04-23 118 views
2

我注意到當我將光標移到我的代碼中的某個單詞上時vb突出顯示了我代碼中的所有單詞。是否有快捷方式同時編輯所有單詞?代碼編輯快捷鍵

回答

3

您需要一個重構工具。
Visual Studio附帶了一個非常簡單的重構工具,可從重構工具欄或重構上下文菜單中獲得。
您正在尋找的功能被稱爲重命名和它的快捷鍵是CTR+R, CTRL+R
(指按兩次鍵CTRL和R)

其他替代品(不是免費的)是ReSharperCodeRush

一個很好的解釋的重構過程可以在Martin Fowler's book, Refactoring中找到:

Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure. It is a disciplined way to clean up code that minimizes the chances of introducing bugs. In essence, when you refactor you are improving the design of the code after it has been written.