PHPStorm: Difference between revisions
| (39 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
==Configuration== | |||
===Editor=== | |||
* tab size in File -> Settings -> Editor -> Code Style -> <Language> | |||
==Operations== | ==Operations== | ||
Change keymapping by CTRL+ALT+S -> Keymapp -> Search -> Right Click -> Add or Remove | |||
===Debugging=== | |||
====Locally==== | |||
The approach is called 'zero-configuration debugging' (browser extension to switch on debugging has to be installed). | |||
* click on 'start listening for PHP Debugging Connections' | |||
* set breakpoint | |||
* call the web page | |||
===Gitting=== | |||
* see [https://www.jetbrains.com/help/phpstorm/version-control-integration.html official documentation] | |||
====Add Files to VCS==== | |||
* open VCS tool window (ALT+9) -> Local Changes | |||
* in Unversioned Filelist Right Click on file -> Add to VCS | |||
* press refresh icon on the left side | |||
====Ignore Files==== | |||
* open VCS tool window (ALT+9) -> Local Changes | |||
* in Unversioned Filelist Right Click on file -> Ignore | |||
* this will not add anything to <code>.gitignore</code>, for this obviously a plug-in is needed. So if adding or pushing via command line be careful. | |||
====Unignore Files==== | |||
* CTRL+ALT+S (will lead to Settings -> Version Control -> Ignored Files) | |||
* select - icon | |||
====Pushing Files==== | |||
* VCS -> Git -> Push // if a remote repository is not configured yet you will be asked for URL, user and pwd | |||
====Watch Changes==== | |||
* open VCS tool window (ALT+9) -> Local Changes | |||
** blue = changed after last synchronization | |||
** green = new files added, but not committed | |||
* in the editor just left of the edit area | |||
** blue bar = line changed | |||
** green bar = line added | |||
** triangle = line deleted | |||
** click on the marks will show the changes | |||
===Finding=== | |||
* find class by name: CTRL+N | |||
* find file: CTRL+SHIFT+N | * find file: CTRL+SHIFT+N | ||
* open declaration: Navigate->Type Declaration or CRTL+SHIFT+B | * find word where the caret is: CTRL+F3 | ||
* find in (sub-)path | |||
** right click on directory -> Find in Path | |||
** Open in Find Window -> adds window in bottom area | |||
===Coding=== | |||
* toogle line comment CTRL+7 (remapped) or 'Code->Comment with Line Comment' | |||
* toogle block comment CTRL+SHIFT+7 (remapped) | |||
* rename classes, methods and variables: Refactor->Rename or SHIFT+F6 | |||
* override methods: Code->Override | |||
* implement methods: Code->Implement methods or CTRL+I | |||
* complete line or language construct: CTRL+SHIFT+ENTER | |||
* move to next method in class: ALT+UP|DOWN | |||
===Cross Reference=== | |||
* open declaration: Navigate->Type Declaration or CRTL+SHIFT+B or CTRL+LEFT_MOUSE (navigate back by Menu->Navigate-Back or CTRL+TAB) | |||
* show class hierachy window: CTRL+H | * show class hierachy window: CTRL+H | ||
* show interface implementations: select interface and press CTRL+ALT+B | |||
* show definition of actual element: CTRL+SHIFT+I | |||
* show method hierachy window: select method and CRTL+SHIFT+H | * show method hierachy window: select method and CRTL+SHIFT+H | ||
* show UML class diagram: select class and press CRTL+ALT+U | |||
* navigate in actual file: CTRL+F12 | |||
===Miscellaneous=== | |||
* synchronize project tree: ALT+F1 | |||
Latest revision as of 15:17, 24 February 2020
Configuration[edit]
Editor[edit]
- tab size in File -> Settings -> Editor -> Code Style -> <Language>
Operations[edit]
Change keymapping by CTRL+ALT+S -> Keymapp -> Search -> Right Click -> Add or Remove
Debugging[edit]
Locally[edit]
The approach is called 'zero-configuration debugging' (browser extension to switch on debugging has to be installed).
- click on 'start listening for PHP Debugging Connections'
- set breakpoint
- call the web page
Gitting[edit]
Add Files to VCS[edit]
- open VCS tool window (ALT+9) -> Local Changes
- in Unversioned Filelist Right Click on file -> Add to VCS
- press refresh icon on the left side
Ignore Files[edit]
- open VCS tool window (ALT+9) -> Local Changes
- in Unversioned Filelist Right Click on file -> Ignore
- this will not add anything to
.gitignore, for this obviously a plug-in is needed. So if adding or pushing via command line be careful.
Unignore Files[edit]
- CTRL+ALT+S (will lead to Settings -> Version Control -> Ignored Files)
- select - icon
Pushing Files[edit]
- VCS -> Git -> Push // if a remote repository is not configured yet you will be asked for URL, user and pwd
Watch Changes[edit]
- open VCS tool window (ALT+9) -> Local Changes
- blue = changed after last synchronization
- green = new files added, but not committed
- in the editor just left of the edit area
- blue bar = line changed
- green bar = line added
- triangle = line deleted
- click on the marks will show the changes
Finding[edit]
- find class by name: CTRL+N
- find file: CTRL+SHIFT+N
- find word where the caret is: CTRL+F3
- find in (sub-)path
- right click on directory -> Find in Path
- Open in Find Window -> adds window in bottom area
Coding[edit]
- toogle line comment CTRL+7 (remapped) or 'Code->Comment with Line Comment'
- toogle block comment CTRL+SHIFT+7 (remapped)
- rename classes, methods and variables: Refactor->Rename or SHIFT+F6
- override methods: Code->Override
- implement methods: Code->Implement methods or CTRL+I
- complete line or language construct: CTRL+SHIFT+ENTER
- move to next method in class: ALT+UP|DOWN
Cross Reference[edit]
- open declaration: Navigate->Type Declaration or CRTL+SHIFT+B or CTRL+LEFT_MOUSE (navigate back by Menu->Navigate-Back or CTRL+TAB)
- show class hierachy window: CTRL+H
- show interface implementations: select interface and press CTRL+ALT+B
- show definition of actual element: CTRL+SHIFT+I
- show method hierachy window: select method and CRTL+SHIFT+H
- show UML class diagram: select class and press CRTL+ALT+U
- navigate in actual file: CTRL+F12
Miscellaneous[edit]
- synchronize project tree: ALT+F1