porcupine icon indicating copy to clipboard operation
porcupine copied to clipboard

refactoring temporary value to variable

Open Akuli opened this issue 2 years ago • 0 comments

print(person.get_name().upper()), select person.get_name().upper(), press some key combination. Should automatically become:

name = person.get_name().upper()
print(name)

I.e. it puts it to a new variable. It might be possible to even guess a reasonable name for the new variable, e.g. by looking at what's before ( and after the ..

This will be a bit language specific, because how exactly you make a new variable depends on language. It would probably be quite unusable in e.g. C, where you need to specify the type of the variable, unless we can somehow ask the langserver.

Akuli avatar Jun 14 '22 22:06 Akuli