Skip to content

Feature Request: Introduce Variable #46

@Oripi

Description

@Oripi

Hi,
There's a really useful feature that i miss from intellij/webstorm and that's the introduce variable: https://www.jetbrains.com/help/idea/extract-variable.html
image

it allows you to put the caret over any part of an expression (usually a method that returns a value but is not assigned to a variable) and when selecting the refactor command it assigns it to a variable.
example:

// before refactor:
function doSomething() {
  return 'hello';
}

something();

// after putting caret at the end/middle/inside parentheses of method and selecting refactor command (the variable name is selected to easily give a new name):
const variableName = something();

would love to see this feature in this great extension :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions