From c09ef1a7ed06f3c321a0f43d367bd6079190327f Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 21 Aug 2019 17:59:59 -0700 Subject: [PATCH] Remove refactor/extract from interactive playground Fixes #51575 Don't highlight a feature in the interactive playground that does not work properly --- .../browser/editor/vs_code_editor_walkthrough.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/vs/workbench/contrib/welcome/walkThrough/browser/editor/vs_code_editor_walkthrough.md b/src/vs/workbench/contrib/welcome/walkThrough/browser/editor/vs_code_editor_walkthrough.md index ffd95c89718..1f306f79ef2 100644 --- a/src/vs/workbench/contrib/welcome/walkThrough/browser/editor/vs_code_editor_walkthrough.md +++ b/src/vs/workbench/contrib/welcome/walkThrough/browser/editor/vs_code_editor_walkthrough.md @@ -5,7 +5,6 @@ The core editor in VS Code is packed with features. This page highlights a numb * [IntelliSense](#intellisense) - get code assistance and parameter suggestions for your code and external modules. * [Line Actions](#line-actions) - quickly move lines around to re-order your code. * [Rename Refactoring](#rename-refactoring) - quickly rename symbols across your code base. -* [Refactoring via Extraction](#refactoring-via-extraction) - quickly extract common code into a separate function or constant. * [Formatting](#formatting) - keep your code looking great with inbuilt document & selection formatting. * [Code Folding](#code-folding) - focus on the most relevant parts of your code by folding other areas. * [Errors and Warnings](#errors-and-warnings) - see errors and warning as you type. @@ -90,21 +89,6 @@ function Book(title, author) { > **JSDoc Tip:** VS Code's IntelliSense uses JSDoc comments to provide richer suggestions. The types and documentation from JSDoc comments show up when you hover over a reference to `Book` or in IntelliSense when you create a new instance of `Book`. -### Refactoring via Extraction -Sometimes you want to refactor already written code into a separate function or constant to reuse it later. Select the lines you want to refactor out and press kb(editor.action.quickFix) or click the little light bulb and choose one of the respective `Extract to...` options. Try it by selecting the code inside the `if`-clause on line 3 or any other common code you want to refactor out. - -```js -function findFirstEvenNumber(arr) { - for (const el of arr) { - if (typeof el === 'number' && el % 2 === 0) { - return el; - } - } - return null; -} -``` - - ### Formatting Keeping your code looking great is hard without a good formatter. Luckily it's easy to format content, either for the entire document with kb(editor.action.formatDocument) or for the current selection with kb(editor.action.formatSelection). Both of these options are also available through the right-click context menu. -- GitLab