eddy147
eddy147

Reputation: 4983

VSCode: Rename symbol (F2) looks broken

For some reason, maybe after the update to 1.50.1, F2 (rename symbol) is not working for me anymore.

With "does not work" I mean the F2 just doesn't do anything. I can still rename files and directories in the tree explorer, but not function names, variables etc.

I use the extension Intelephense for PHP; but even after I disable all extensions, deleted ~/.config/User/Code directory, and install a fresh VSCode F2 does not work.

VSCode Version: 1.50.1, commit d2e414 OS Version: Linux x64 5.4.0-51-generic snap Node.js: 12.14.1

Steps to Reproduce:

Expected: you can edit the name of the symbol to be renamed

Actual: nothing happens, so can not rename the symbol.

Notes:

== UPDATE == I chatted with support of vscode via Github. Nothing worked, but what did work was upgradng from Ubuntu 18.04 to 20.04, and a complete removal of vscode (cache, extensions, etc).

Upvotes: 6

Views: 8493

Answers (2)

Acid Coder
Acid Coder

Reputation: 2746

macOS 14.4.1

System Settings -> Keyboard Shortcuts -> Functions Keys -> turn on Use F1, F2, etc. keys as standard function keys

Upvotes: 0

Son Tung PHAM
Son Tung PHAM

Reputation: 76

I didn't know that we could do F2 in php in vscode to rename refactor class, function, variables, ... As far as I know, it works only in typescript.

Anyway, I have juste made an extension to do the job. Feel free to check it out https://marketplace.visualstudio.com/items?itemName=st-pham.php-refactor-tool&ssr=false#overview

Upvotes: 5

Related Questions