Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Introduce Variable #46

Open
Oripi opened this issue Sep 15, 2022 · 0 comments
Open

Feature Request: Introduce Variable #46

Oripi opened this issue Sep 15, 2022 · 0 comments

Comments

@Oripi
Copy link

Oripi commented Sep 15, 2022

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant