Refactoring keyboard shortcuts in MonoDevelop

Are there any key bindings to refactoring commands in MonoDevelop?

+4
source share
3 answers

Direct answer : Yes, there is.

A slightly more useful answer : depending on what you are looking for, quick examples:

  • Alt + Return has a quick fix (if you have the original analysis enabled)
  • Alt + Insert - code generation (properties, overrides, etc.)
  • F2 rename

And in case you do not know, all refactoring for the character that you received under your cursor is available in the context menu of the context menu (accessible by pressing the corresponding keyboard key, so it also looks like a keyboard binding;))

In addition, you can search and / or change all (or at least many, I'm not quite sure) bindings in Options > Preferences > Key Bindings .

The above answers to your question?

+10
source

It depends on which version of MonoDevelop you are using. At the end of the 2.x series, individual key bindings for "Create Method", "Extract Local Variable" and some others were added (see the documentation ).

Renaming (including renaming files in the Explorer view and renaming variables, classes, or anything else in a text editor) is a separate key binding in the "Edit" section and the F2 shortcut key is used by default.

As with v3.x, these key bindings seem to have disappeared. Edit> Preferences> Key Bindings still has a Refactoring section, but now it only displays Import Symbol, Quick Fix, and Show Fixes (none of which I would even call refactoring - these are more code completion functions). Instead, refactoring methods are available as Quick Fixes (default: Alt + Enter when Source Analysis is enabled from Edit> Preferences> Other> Source Analysis).

The reason for the change is that the refactoring mechanism has been redesigned and now uses the original analysis, but so far it is not completely perfect and therefore is not enabled by default. Since they are part of the Quick Fix system, then they were not assigned separate key bindings (since I believe that there are more of them now).

+2
source

For me, in the "Source Analysis" menu: Tools> Option> Initial Analysis (in a text editor)> Enable

Well, it makes some changes on the editor screen, it really does not give me a useful suggestion for fixing (autocomplete), for example Eclipse, regardless of whether I press Alt + Enter.

0
source

All Articles