I use VSCODE to write the php code.
I'm going to rename a variable or function.
Many sites say "Press F2", but
When I actually press F2, there is no response.
The variable has a cursor and the variable is selected, all of which are unresponsive.
Click Ctrl-F2 to change the string.
It is not available because it ignores the scope and changes all characters.
function sample1(){
$result=1;//<=Change this
return$resutl;
}
function sample2(){
$ResultSample=2;
return$ResultSample;
}
/// If resetl is hoho, the following occurs:
function sample1(){
$hogehoge=1;
return $hogehoge;
}
function sample2(){
$hogehogeSample=2;
return $hogehogeSample;
}
By the way, when editing vue, you can change the name of the in-scope variable with the "f2 key when the variable has a cursor (not selected)."
There seems to be some configuration, but I couldn't find it in the search engine.
Is there anything that needs to be expanded?
Thank you for your cooperation.
In VS Code, F2 should have editor.action.rename
assigned
When using php, another command may be enabled by specifying when
(You may find it by referring to the keyboard shortcut (Ctrl+kCtrl+s).
If you want to run editor.action.rename
, open the command palette (Ctrl+Shift+p) and copy the command ID
Alternatively,
editor.action.rename
to another key
915 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
612 GDB gets version error when attempting to debug with the Presense SDK (IDE)
581 PHP ssh2_scp_send fails to send files as intended
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.