Skip to content

Instantly share code, notes, and snippets.

@maepon
Last active January 13, 2017 02:39
Show Gist options
  • Save maepon/0382fefe3f0929edf61a646895506730 to your computer and use it in GitHub Desktop.
Save maepon/0382fefe3f0929edf61a646895506730 to your computer and use it in GitHub Desktop.
PhpstormのTips of the Day

PhpstormのTips of the Dayの日本語訳

Macです

順番は適当(見た順)


20161201

Use the ⇧⌘V shortcut to choose and insert recent clipboard contents into the text.

shift``⌘``Vのショートカットを使うと、起動後にクリップボードに保存した内容を選んで挿入します。


20161202

The shortcuts such as F1 (View | Quick Documentation), ⌘P (View | Parameter Info), ⌘B (Navigate | Declaration) and others can be used not only in the editor but in the code completion popup list as well.

F1(View | Quick Documentation)、⌘``P(View | Parameter Info)、⌘``B(Navigate | Declaration)などのショートカットは、エディター画面だけでなくコードの補完リストでも同様に利用できます。


20161203

For the pattern search in the Go to Class, Go to Symbol and Go to File pop-up frames, use * and space symbols.
* stands for any symbol.
Space at the end means the end of a pattern, and the preceding string will be considered not just a prefix but a whole pattern. The list of the suggested names will be reduced accordingly.

Go to ClassやGo to Symbol、Go to Fileのポップアップ検索でのパターン検索で、*spaceを利用します。
*は任意の文字や記号などのシンボルを表します。
末尾のスペースは、パターンの終わりを意味し、その前の文字列は接頭辞だけでなく、全体のパターンとして考慮されます。提示されるリストは、その検索の文字列によって減っていきます。


20161204

To open any particular method or field in the editor quickly, press ⌥⌘O (Navigate | Symbol) and start typing its name.
Choose the symbol from a drop-down list that appears.

特定のメソッドや領域を素早く開くには、option``⌘``O(Navigate | Symbol)から、その名前を入力開始してください。
表示されたドロップダウンの一覧から選んでください。


20161205

Use ⌥⇧C to quickly review your recent changes to the project.

プロジェクトの最近の変更はoption``shift``Cで確認できます。


20161206

Use Basic Completion (⌃Space) within HTML, CSS and other files, for completing image file names.

HTMLやCSSなどのファイルで画像ファイル名を補完する場合は、基本的な補完(control``space)を利用します。


20161207

With a single keystroke, you can apply another code style/coloring scheme or keymap right from the editor. Just press ⌃` (View | Quick Switch Scheme), to specify the scheme you want to change.

エディター画面からコードスタイル/配色、キーマップなど一度のキーストロークで適当できます。変更する対象を指定するにはcontrol`を入力します。


20161208

When in the Go to Class, Go to Symbol, or Go to File popup, you can ease the search by filtering the lookup list with the help of the "camel words" prefixes.

Go to ClassやGo to Symbol、Go to Fileのポップアップの際に、キャメルケースの大文字の先頭文字でリストをフィルタリングすると検索が楽になります。


20161209

You can use Basic Completion (⌃Space) in HTML, CSS and JavaScript files, for completing attributes, parameters, tags, selectors, etc.

Basic Completion (control``Space)で、HTMLやCSS、JavaScriptのファイルで、属性やパラメーター、タグ、セレクターなどの補完が行なえます。


20161210

By pressing ⌃⌥R you can access the Run/Debug dropdown on the main toolbar, without the need to use your mouse.

control``option``Rで、メインツールバーにある「Run/Debug」のツールバーをマウスを使わずに操作できます。


20161211

You can quickly review all styles currently applied to an HTML tag, by right-clicking the tag name and selecting Show Applied Styles For Tag from the context menu:

HTMLのタグを右クリックして表示されるコンテキストメニューからShow Applied Styles For Tagを選ぶと、適用されるスタイルを素早く確認できます。


20161212

The Local Changes tab of the Version Control tool window shows all deleted, modified, and unversioned files in a single view. Use keyboard shortcut to show or hide this tool window.

From the Version Control tool window you can perform all the necessary version control actions: commit changes, manage changelists, put resources under version control, examine differences and more.

バージョンコントロールツールウィンドウのLocal Changesタブには、削除、変更、およびバージョン管理されていないすべてのファイルが単一のビューに表示されます。 キーボードショートカットを使用して、このツールウィンドウを表示または非表示にします。 バージョン管理ツールウィンドウから、必要なバージョン管理アクション(変更のコミット、チェンジリストの管理、バージョン管理下のリソースの配置、相違点の確認など)をすべて実行できます。


20161213

If you don't want to commit some of your changes to the repository, you can set them aside for a while, by moving to a separate changelist, or by putting them to a shelf. Select such file in the Local tab of the Changes tool window, and on the context menu choose Move to another changelist, or Shelve Changes.

変更をリポジトリにコミットしたくない場合は、別のチェンジリストに移動したり、シェルフに入れたりして、しばらくの間、変更を保存することができます。 変更ツールウィンドウのlocal Changesタブでそのようなファイルを選択し、コンテキストメニューでMove to another changelistまたはShelve Changesを選択します。


20161214

You can bring forward the list of all usages of a class, method or variable across the whole project, and quickly jump to the selected usage. To do that, place the caret at the symbol's name or at its usage in code and press ⌥⌘F7 (Edit | Find | Show Usages in the main menu), scroll the list and click the desired usage.

クラス、メソッド、または変数のすべての用途のリストをプロジェクト全体に渡して、選択した用途にすばやくジャンプすることができます。 これを行うには、シンボル名またはコードの利用箇所にキャレットを置き、⌥⌘F7(Edit | Find | Show Usages in the main menu)を押し、リストをスクロールして目的の使用法をクリックします。


20161215

To quickly find a menu command or toolbar action, you do not need to look through the menus. Just press ⇧⌘A (Help | Find Action on the main menu) and start typing the name of the action. Choose the desired action from the suggestion list.

メニューコマンドまたはツールバーのアクションをすばやく見つけるには、メニューを見る必要はありません。 shift``command``A(メインメニューの[Help | Find Action])を押して、アクションの名前を入力するだけです。 提案リストから目的のアクションを選択します。


20161216

You can quickly find a setting you need in the Settings/Preferences dialog, without browsing through the numerous options. Just type some characters that, in your opinion, exist in the option description, and the list of settings will reduce to the matching ones. Select the desired entry, and see the setting that contains the entered characters highlighted:

多くのオプションを参照することなく、[Settings/Preferences]ダイアログで必要な設定をすばやく見つけることができます。 オプションの内容で、あなたが思いつくいくつかの文字を入力するだけで、設定のリストは一致するものに縮小されます。 目的の項目を選択し、入力した文字がハイライト表示されている設定を確認します。


20161217

When searching for a text string in a file, use recent history: with the search pane already open, press ⌘F once again to show the list of recent entries.

ファイル内の文字列を検索するときは、最近の履歴を使用します。検索ペインが開いている状態でcommand``Fをもう一度押すと、最近の検索語の一覧が表示されます。


20161218

When you are finding text in the current file (⌘F), you don't need to type the whole search string: Basic Code Completion is available in the search field. Start typing, press ⌃Space, and select the desired string from the suggestion list.

現在のファイル(command``F)でテキストを検索しているときは、検索文字列全体を入力する必要はありません。基本的なコード補完は、検索フィールドで使用できます。 入力を開始し、^``spaceを押して、提案リストから目的の文字列を選択します。


20161219

Ctrl+Click a tab in the editor to navigate to any part of the file path. Select the necessary element in the drop-down, and the corresponding file path is opened in an external browser (e.g., in the Explorer, if your OS is Windows).

Ctrlを押しながらエディタのタブをクリックすると、ファイルパスの任意の部分を指定できます。 プルダウンで必要な要素を選択すると、対応するファイルパスが外部ブラウザ(OSがWindowsの場合はエクスプローラなど)で開きます。


20161220

You can easily open an external file for editing, if you just drag it from the Explorer or Finder to the editor.

エクスプローラまたはFinderからエディターにドラッグするだけで、外部ファイルを簡単に開くことができます。


20161221

There are two ways of closing all tabs in the editor, except the current one: First, right-click the editor tab, and choose Close Others on the context menu. Second, keeping the Alt key pressed, click on the editor tab.

現在のエディタを除いて、エディタ内のすべてのタブを閉じるには2つの方法があります: ひとつ目は、エディタタブを右クリックし、コンテキストメニューで[Close Others]を選択します。 ふたつ目は、Altキーを押したまま、エディタタブをクリックします。


20161222

Use ⌃↑ and ⌃↓ keys to quickly move between methods in the editor.

⌃``↑⌃``↓キーで、メソッド間の移動を行います。


20161222

You can jump directly to any deeply buried file, if you press ⇧⌘O, and type just a couple of characters of the enclosing directories and file names:

深いディレクトリ構造の奥のファイルを直接するには、shift``command``Oを押した後に、含まれているディレクトリとファイル名を数文字打ち込むことで、可能になります。


Did you know that you can close tabs in the editor and the tool windows of PhpStorm without actually using the context menu commands? It is enough to point with your mouse cursor to a tab to be closed, and click the middle mouse button, or just use the Shift+click combination.


To help you learn the purpose of each item in the main menu, its short description is shown in the status bar at the bottom of the application frame when you position the mouse pointer over this item.


You can easily make column selection by dragging your mouse pointer while keeping the Alt key pressed.


To quickly find a menu command or toolbar action, you do not need to look through the menus. Just press ⇧⌘A (Help | Find Action on the main menu) and start typing the name of the action. Choose the desired action from the suggestion list.


You can quickly view the image referenced at caret by using the Quick Definition (⌥Space). The underlying image will be opened in a popup instead of a separate editor tab.


It is possible to rename CSS selectors directly from HTML. Position the caret at the selector to be renamed and press ⇧F6 (Refactor | Rename).


PhpStorm simplifies your work with colors in CSS files. The color properties have the icons of the corresponding color in the left gutter area of the editor. Click color icons to choose the desired color from the color picker.


The Local Changes tab of the Version Control tool window shows all deleted, modified, and unversioned files in a single view. Use keyboard shortcut to show or hide this tool window. From the Version Control tool window you can perform all the necessary version control actions: commit changes, manage changelists, put resources under version control, examine differences and more.


PhpStorm lets you jump from your check-in comment to an issue in your task tracker. All you have to do is to define issue navigation patterns in the Settings | Version Control dialog:


When using basic code completion (⌃Space), you don't need to type upper-case letters in CamelHump names. It is enough to type the initial letters of the camel names in lower case, and they will be smartly recognized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment