Skip to content

Refactoring

Scrivener07 edited this page Jun 26, 2019 · 5 revisions

The Papyrus Language extension provides features related to refactoring source code.

Source code refactoring can improve the quality and maintainability of your project by restructuring your code without modifying the runtime behavior.

Table of Contents

Search and Replace

You can use Search and Replace to rename the current selection across files. Expand the Search widget to display the Replace text box. Read more about VS Code Search and Replace.

Change All Occurrences

The Change All Occurrences command will rename the current selection within a single file. Refactoring with Change All Occurrences is ideal for local refactoring. Use this to find and replace all occurrences in the open file and change them as you type.

Rename Symbol

The Rename Symbol command will rename a source code symbol across files. Renaming is a common operation related to refactoring source code and the Rename Symbol command (F2) makes this simple.

Press F2 and then type the new desired name and press Enter. Alternatively, you can use the context menu. All usages of the symbol will now be renamed, across files.

Read more about the VS Code Rename Symbol command.

Clone this wiki locally