Move Definition Location
What: Lets you immediately move a function definition to the corresponding header file.
When: You have a function that you want to move to a header file.
Why: You could manually move the function, but this feature will move it automatically, creating the header file if required.
Place your text or mouse cursor over the function for which you want to move.
Next, do one of the following:
- Press Ctrl+. to trigger the Quick Actions and Refactorings menu and select Move Definition Location from the context menu.
- Right-click and select the Quick Actions and Refactorings menu and select Move Definition Location from the context menu.
The function will be moved to the corresponding header file, which you will see in a popup preview window. If the header file does not exist, it will also be created and placed in the project.