rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.91k stars 299 forks source link

Change default keyboard shortcuts for Indent Module and Indent Procedure #3273

Open ghost opened 7 years ago

ghost commented 7 years ago

Currently, the default keyboard shortcuts for Indent Module and Indent Procedure are Ctrl+M and Ctrl+P, respectively.

These shortcut keys are inherited from Smart Indenter to provide a natural transition for former SI users.

Considering that the VBE still shows Ctrl+M for "Insert Module" and Ctrl+P for "Print" in the menus, and that both are logical and/or common shortcuts, the default keyboard shortcuts for Indent Module and Indent Procedure should be changed to Ctrl+Shift+M and Ctrl+Shift+P, respectively.

However, full resolution of this issue requires more: RD already detects an installation of Smart Indenter and, if detected, prompts the user if they want to import SI settings into RD. A dialog needs to be added to that detection that asks the user if they want to use the SI keyboard shortcuts or the RD keyboard shortcuts, like so:

Use Smart Indenter hotkeys? Click [Yes] to map Ctrl+M and Ctrl+P to "indent module" and "indent procedure", respectively. Click [No] to use Rubberduck default hotkey settings.

retailcoder commented 7 years ago

With 2-step hotkeys (#3271) I'd go with Ctrl+I,M and Ctrl+I,P, respectively for indent module and indent procedure. And heck, Ctrl+I,Shift+P for indent the whole entire project, since we actually can do this before the human brain even registers* the "click" the mouse makes as the button is released and the command starts running.

*Almost. Tests show we can indent a reasonably large project in ~15ms. Brain response is ~10ms.