VisualStudio: Shortcut for when Renaming Variable

后端 未结 12 1142
轻奢々
轻奢々 2021-02-02 05:33

In Visual Studio, when you rename a variable name in its definition, there\'s a little underline in the last letter so if you hover that, you\'ll get the option \"Rename OldVari

12条回答
  •  旧巷少年郎
    2021-02-02 05:58

    Depending on what the default keyboard mapping scheme you use, you might be able to get away with simply pressing F2 to call Rename before ever typing in the text change.

    If your version of VS does not have the F2 mapped, you can rename that from within the program's Main Menu:

    • Tools >> Options
    • In Options Dialog, expand Environment, and then select Keyboard
    • Type File.Rename into the "Show commands containing" Search box
    • Select the "Press Shortcut keys" TextBox and click F2
    • Click Assign

    screenshot

提交回复
热议问题