phpStorm 安裝配置

php

 

 

首先配置php解釋器,進行相關設置:html

 

配置nodejs支持java

安裝plugins nodejs。node

 

問:如何修改模板的默認註釋?laravel

答:建立一個php文件,默認有:web

<?php
/**
* Created by PhpStorm.
* User: xx
* Date: 2014/11/9
* Time: 23:19
*/
在File | Settings | File Templates找到模板修改


phpstorm 或 webstorm  設置多個項目能夠並存:

File -> settings -> prjecct:名字-》Directories -> Add Content Root 中添加你當前的工程目錄。
(不一樣版本設置位置可能不一樣,可使用搜索)

另外,在 「Project」面板那,把顯示類型切換到 「Project」狀態,這樣就能夠顯示全部的項目了.




顯示行號:

file-》Settings =》Editor->Appearance->Show line number

phpstrom
ctrl+d是複製當前行到下一行(duplicate line)
ctrl+y是刪除當前行


跳到
右鍵選擇go to
跳到declaration(ctrl+B)

phpstorm增長command line tools

PhpStorm has had support for command line tools for a while. Using the command line tools, we can invoke commands right from our IDE! We can bring up the command line tool using the Tools | Run Command... menu or with Ctrl+Shift+X (Cmd+Shift+X on Mac).數據庫

The command line tools come with support for autocompletion of several known tools. Nothing comes for free: we have to add the tools we want to use through the IDE Settings | Command Line Tool Support pane. After adding Composer, for example, we get autocompletion on all composer commands:編程

參考:瀏覽器

https://confluence.jetbrains.com/pages/viewpage.action?pageId=50502260app

 

php默認配置文件目錄:

C:\Users\Administrator\.WebIde100 

#如何更換主題

默認的字體和背景色都是挺傷眼睛的,可是咱們能夠手動更換其餘更好的主題:

能夠從這個網站(http://phpstorm-themes.com)下載各種主題的xml文件,

而後將文件放到PhpStorm的文件夾中,好比:c:/Users/USERNAME/.WebIde10/config/colors,

若是此時正好開着PhpStorm,那麼須要重啓一下該IDE,以便載入改爲你添加的主題,

在IDE的左上角菜單中,選擇 File > Settings > Editor > Colors & Fonts ,而後在下拉菜單中,選中你剛纔添加的主題名稱,保存設置後,就大功告成了。

 

 

更改phpstorm編輯php的背景色

默認編輯php時背景色帶點淺綠,我我的不是很喜歡,我喜歡背景白色的,能夠這樣設置,setting->editor->colors and fonts->php,在右邊的php code[backgrond]中,修改background顏色。

 

3, 去掉波浪線:

settings -> Editor -> Colors & Fonts -> General -> TYPO->Effects

 

4, 顯示行號:

settings -> Editor->Appearance->Show line numbers 

 

5,遠程或本地同步文件:

Tools -> Deploments -> Configuration

 

6, 去掉右上角瀏覽器圖標:

settings -> tools -> WebBrowsers

 

7, 添加VIM插件:

settings->editor ->plugins->browse repositories ->搜索VIM

 

8,啓動的時候不打開工程文件

Settings->General去掉Reopen last project on startup.

 

9, 取消自動保存

appearance -> system settings -> save file的兩個選項 去掉

 新版本優化文件保存

File->Settings->General->
Synchronize file on frame activation:我的須要是否取消同步文件
Save files on framedeactivation:取消
Save files automatically:選中,設置自動保存,設置 30秒自動保存時間,這樣IDEA依然能夠自動保持文件,因此在每次切換時,你須要按下Ctrl+S保存文件

 

 

10, 將編輯的文件加星號標識:

settings -> editor -> editor tabs -> 勾選 mark modifed tabs…

 

11, 添加擴展名高亮顯示:

settings -> editor -> file types  

 

 

經常使用快捷鍵:

 

 

command + option + l    將代碼格式化

command + shift + u    切換大小寫

command + shift + + / command + shift + -     摺疊/展開全部區塊

command + e     列出最後打開的文件

control + tab  / control + shift + tab     切換打開的文件

command + /     行註釋

ctrl + shift + /      塊註釋

command + b     函數追蹤,command +單擊

command + alt + 左右箭頭      操做動做前進/回退

shift + command + r      按文件名搜索對應文件所在路徑

shift + command + t      按類名搜索對應文件所在路徑

shift + command + c      複製當前文件所在路徑

Command + Shift + O     打開文件

Command + O          打開類

alt + F1        定位編輯文件所在位置:

alt + F12        打開命令行欄

command + shift + f 全局搜索

 

phpstorm太佔內存;

1) 不要一次打開一個太大的foler,phpstorm會作所有打開文件的索引
2) 若是你機器性可以好,試着編輯下bin目錄裏的vmoptions,裏面是phpstorm自己的虛擬機參數
3) 打開memory選項視圖,當內存過大的時候,你能夠手動點擊下清除部份內存

setting裏的插件選項

 

phpstorm啓動內存配置

PhpStorm.exe.vmoptions默認

-server
-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow

-Xms128m JVM初始分配的堆內存
-Xmx512m JVM最大容許分配的堆內存,按需分配
-XX:PermSize=64M JVM初始分配的非堆內存
-XX:MaxPermSize=128M JVM最大容許分配的非堆內存,按需分配

 

 

Live template: 實時模板

Live templates let you insert frequently-used or custom code constructs into your source code file quickly, efficiently, and accurately. To expand a code snippet, type the corresponding template abbreviation and press Tab. Use Tab to jump from one variable in the template to another, see Live Template Variables.

https://www.jetbrains.com/help/phpstorm/live-templates.html

 

PhpStorm 超強語言模板的支持

 

  • 在使用Zen Coding插件時,PHPStorm不像Notepad++那樣隨便使用。PHPStorm只有在編輯識別爲HTML的文件時纔可使用Zend Coding。
  • 在PHPStorm編程時,關於數據庫操做的SQL語句會有相應的提示。

因而搜索PhpStorm在編寫PHP代碼,可否切換某一塊代碼片斷到其餘編程語言。

在不少項目中,咱們常常在編程的時候想進行切換編程語言,一般咱們須要在代碼的字符串中嵌入一塊不一樣的編程語言。例如:在PHP代碼中嵌入一個HTML片斷,若是你也遇到相似的狀況。

PhpStorm IDE PHP code 插入一段HTML代碼,其中有部分PHP變量和轉義字符串。

$htmlFragment 變量爲一段HTML代碼,其中有部分PHP變量和轉義字符串。

而遇到這種狀況,就不能很好的使用HTML代碼提示,好比<p></p> 不能直接經過自動閉合等,一個一個的敲打鍵盤是一個很是苦力的事。

PhpStorm編程語言切換

PhpStorm可以認識到這些狀況,它爲咱們提供了一個功能全面的HTML編輯器來編輯現有的字符串:

咱們也能夠建立一個字符串,並使用語言切換(Alt+Enter)手動指定字符串到有另外的的語言:

 

 是一個很是棒的小功能,徹底提升了編程效率。並且這個功能適用於其餘全部語言。

 

 php文件右上角顯示的瀏覽器圖標:

設置-》web browser:

取消show browser pop in t he edit。

 

 

 

  

 

http://www.cnblogs.com/vincent_ds/archive/2012/11/09/2761900.html

http://www.cnblogs.com/jikey/p/3486621.html

http://www.chenxuanyi.cn/xampp-phpstorm-xdebug.html

 

 

http://confluence.jetbrains.com/display/PhpStorm/Getting+Started+with+Node.js+in+PhpStorm

 http://blog.snsgou.com/post-730.html

 

laravel支持:

http://www.tuicool.com/articles/fYNR3e

http://www.tuicool.com/articles/fqaARj6

 

http://www.wwwquan.com/show-66-121-1.html

http://blog.csdn.net/xd43100678/article/details/39342373

https://phphub.org/topics/1692

相關文章
相關標籤/搜索