Home >Backend Development >PHP Tutorial >A complete list of practical functions and shortcut keys in PHPStrom_php tips
What shortcut keys or unique functions of PHPStrom make the writing process comfortable and fast for you?
CTRL j can quickly enter commonly used code snippets, similar to vim's snipMate, and can add custom code snippets
find every thing phpstorm supports separate searches for class names, file names, etc. What I usually use is to search all directly. Find every thing requires custom shortcut keys
Very precise positioning of functions, class names, variables, etc., supporting namespaces. I have to admit that it is indeed very good, much better than vim ctag
alt F7 find usages function, you can easily find where the function is called
Shift F6 Rename can easily rename methods, variable names, etc. Even the renaming of the file will automatically correct the include filepath (it seems to be limited to simple paths, and the paths containing variables cannot be recognized. Constants are no problem)
You can install the vim plug-in and enjoy the quick operation of vim
ctrl alt l code formatting
If your test code is to be uploaded to the test machine via ftp, the Tools->deployment function must be configured to automatically upload the modified files to the test machine
Not only svn but also git has good support
You can configure breakpoint debugging, refer to http://confluence.jetbrains.com/display/PhpStorm/Zero-configuration Web Application Debugging with Xdebug and PhpStorm It is not commonly used
The supported php version is very new. The current phpstorm7 supports php5.5. The next phpstorm8 supports Php5.6.
Unused variables in functions are gray. Use of undefined variables will be underlined in red. Prompt variables help reduce manual errors
The above are what I commonly use, and there are many functions such as support for composer phpunit that I have not used yet. These are the custom command line operations
1. Right-click on the project name and select "Local History | Show History" to view local modification records
2. Ctrl E to view recently opened files or projects
3. Open File | Setting | Editor and select Show Method Separators under Appearance. It will intelligently divide your code into gray wireframes according to methods. You can also use: alt ↑ or ↓ to jump between methods
4. Ctrl Shift V to select recent content to paste
5. Ctrl D, copy and paste the selected text
6. Ctrl Y, delete the current line or selected line
7. Ctrl Alt left and right arrow keys to navigate to the last edited position
8. Alt up and down arrow keys, jump to the up/down function
9. Alt left and right arrow keys, navigation label switching
10. Ctrl N, search based on class name
11. Ctrl Shift N, search based on file name
12. Ctrl Shift Alt N, search based on function name
13. Ctrl Shift F, Find in Path
14. Ctrl Shift I, view the value of variable initialization
15. Ctrl F12, quick way to view all the current files
16. Ctrl /, single line comment
17. Ctrl Shift /, multi-line comments
18. Modify the default open file template: "file" ---> "setting" --->"file and code template"
19. /** Enter, automatically generate comments
20. Ctrl Alt L, format code
A list of commonly used shortcut keys for phpstorm
Mac computer phpstorm shortcut keys
command a select all
command c copy
command v paste
command z undo
command k code search
command l Enter the line number to jump to a certain line
command o View the structure of a class
command / single line comment
command e lists the last opened files
ctrl shift / block comment
shift command x
shift command r Search the path of the corresponding file by file name
shift command t Search the path of the corresponding file by class name
shift command c copies the path of the current file
Select the file name on the left shift f6 (mac needs to hold down the keys at the same time) to rename the file
Shortcut keys for phpstorm under windows
ctrl shift nfind file
ctrl shift f Find a piece of code in a directory (an upgraded version of ctrl f)
ctr shift r Find a piece of code in a directory and replace it (an upgraded version of ctrl r)
CTRL ALT ←/→ Return to the last edited position
ALT ←/→ Switch code view, label switching
ALT ↑/↓ Quickly move positioning between methods
ctrl j insert active code prompt
ctrl alt t insert wrapping code at current position
alt insert generate code menu
ctrl q to view code comments
ctrl d copies the current line
ctrl y deletes the current line
shift F6 rename
ctrl shift u letter case conversion
ctrl f search
ctrl r replace
F4 to view source code
ctrl shift i to view variable or method definition source
ctrl g jump to line
ctrl alt F12 jumps to the location of the current file on the disk
Alt down to see the next method
Alt up to view the previous method
ctrl alt l to reformat code
ctrl shift downstatement move down
ctrl shift upstatement move up
alt shift downline move down
alt shift upline move up
ctrl/line comment
ctrl shift/block comment
ctrl shift n to open the file in the project
ctrl b jumps to variable declaration
ctrl [] matches {}[]
ctrl shift ]/[select block code
ctrl x cut line
ctrl shift v copy multiple texts
alt left/right label switching
ctrl p displays default parameters
ctrl F12 to quickly find methods in the current class file
-------------------------------------------------- ---------------
phpstorm shortcut key:
// ctrl shift n find files
//ctrl j insert activity code prompt
//ctrl alt t insert wrapping code at the current position
// alt insert generate code menu
// ctrl q View code comments
//ctrl d copies the current line
//ctrl y delete the current line
// shift F6 rename
//ctrl shift u Convert letters to uppercase and lowercase
// ctrl f search
// ctrl r replace
//F4 View source code
// ctrl shift i View variable or method definition source
// ctrl g jump line
// ctrl alt F12 jump to the location of the current file on the disk
// alt down to view the next method
// alt up to view the previous method
// ctrl alt l reformat the code
//ctrl shift down statement moves down
// ctrl shift up statement moves up
// alt shift down line move down
// alt shift up line move up
// ctrl / line comment
// ctrl shift / block comment
//ctrl shift n open the file in the project
//ctrl b jump to variable declaration
// ctrl [] matches {}[]
// ctrl shift ]/[ select block code
....
//ctrl x cut line
// ctrl shift v copy multiple texts
// alt left/right label switching
// ctrl p displays default parameters
//ctrl F12 to quickly find methods in the current class file