How to use phpstorm to save (ctrl+s) and format the code at the same time

藏色散人
Release: 2020-12-10 15:05:40
forward
2502 people have browsed it

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

How to use phpstorm to save (ctrl+s) and format the code at the same time

##1. Select Edit->Macros->Start Macro Recording, as shown below:

How to use phpstorm to save (ctrl+s) and format the code at the same time

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.

How to use phpstorm to save (ctrl+s) and format the code at the same time

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

How to use phpstorm to save (ctrl+s) and format the code at the same time

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

How to use phpstorm to save (ctrl+s) and format the code at the same time

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

How to use phpstorm to save (ctrl+s) and format the code at the same time

The above is the detailed content of How to use phpstorm to save (ctrl+s) and format the code at the same time. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!