nicoespeon / abracadabra

Automated refactorings for VS Code (JS & TS) ✨ It's magic ✨
https://marketplace.visualstudio.com/items?itemName=nicoespeon.abracadabra
MIT License
809 stars 48 forks source link

Fix the selection when extracting a variable #1056

Closed nicoespeon closed 3 months ago

nicoespeon commented 3 months ago

Extracting a variable (Ctrl + Alt + V / ⌥ ⌘ V) while selecting a portion of the value may result in a partial selection when you get to name the extracted variable. Annoying!

Not anymore… The whole identifier is now selected, so you can just write the name right away 😉

Before:

https://github.com/user-attachments/assets/af28217a-f220-4d76-b905-e22e09967db1

After:

https://github.com/user-attachments/assets/d105b73d-e0b0-4f42-b838-ccca8633bcb0