phpstorm realizes the method of saving (ctrl+s) while formatting the code

The following section of the phpstorm tutorial section will introduce phpstorm to save (ctrl+s) and format the code at the same time. I hope it will be helpful to friends in need!



1. Select Edit->Macros->Start Macro Recording, as shown in the figure below:



2. Directly press the shortcut key you want to record, Ctrl+ALT+L, Ctrl+S, and then click The little red dot in the picture below.



3. Then enter Format And Save (the name can be entered at will, as long as you can remember it)



4. In File->Settings->Keymap->Macros, find the just added "Format And Save", right-click " add keyboard shortcut", enter the shortcut key "Ctrl+S", and click "OK". At this point, the code save (Ctrl+S) automatic formatting is completed. Hurry up and try it.



Note: If it is a finished phpstorm, some will not be able to enter "Settings", please find the language resource package (installation directory, under lib), temporarily restore it to English, restart phpstorm, enter the settings, and after the modification is successful, restore to Chinese .

Guess you like

Origin blog.csdn.net/zl17822307869/article/details/113840772