PhpStorm best practice

Entwicklungshilfe

Magento Stammtisch Köln 20.06.2016

entwicklungshilfe.nrw / @help_for_devs / FB/entwicklungshilfe.nrw
Black White EH

PhpStorm Topics

General settings

Project settings

Advanced actions and shortcuts

Plugins

Working with PhpStorm

Sources

General settings

  • Themes
  • Fonts

Themes

  • Dracula
  • Solarized dark

Fonts

  • Hack
  • Consolas
  • ...

Project settings

  • Code style
  • Editor
  • PHP

Code style

  • PHP -> Tabs and indents -> uncheck use tabs
  • PHP -> Wrapping and braces -> uncheck comment at first column
  • uncheck line breaks

Editor

Is global setting File and Code Teplates -> Includes -> PHP file header -> Beispiel

Languages and frameworks

  • PHP
  • brew install php
  • search for it
  • language level and interpreter match
  • Check xdebug match port
  • Servers clean use automate
  • Codesniffer

Advanced actions and shortcuts PhpStorm

Advanced actions and shortcuts PhpStorm

Line

  • Move line (Shift + Alt + up / down)
  • Line
  • Duplicate line (cmd + d)
  • Remove line (cmd + del)

Curser

horizontal

  • moving (alt + arrow left / right )
  • Select (shift + alt + Pfeil links / rechts)
  • Select section (alt + arrow up)
  • Begin (cmd + left) / End (cmd + right)

Navigate

Method

  • new setting
  • Previous method ctrl+alt+arrow up
  • Next method ctrl+alt+arrow down

Multi curser

  • Select variable
  • crtl + g on variable select next
  • crtl + cmd + g on variable select all
  • not full match
  • Blocks jump with alt
  • Only curser + mouse click

Documentation

Phpdoc (cmd+n PhpDoc + cmd a + enter)

Auto completion

crtl + space

Refactor

crtl+t

Resize font

add cmd + 0

Navigate file structure

cmd + arrow up also auto completion

Basic settings PhpStorm

Basic settings for PhpStorm

Open and scrolling

Scroll and open fast

Open file directly on click. Scroll to actual file.

Key settings add PhpStorm

Key settings to add PhpStorm

Working with PhpStorm

Hands on

Working with PhpStorm

  • Scopes
  • Colors (Directories)
  • Commands
  • Views (DB, Terminal)

Shortcuts

cmd + <
switch open window

cmd + o && cmd + shift + o

Key Promoter

Fragen?

Danke!