、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在编写PHP代码,可否切换某一块代码片断到其余编程语言。
在不少项目中,咱们常常在编程的时候想进行切换编程语言,一般咱们须要在代码的字符串中嵌入一块不一样的编程语言。例如:在PHP代码中嵌入一个HTML片断,若是你也遇到相似的状况。
$htmlFragment 变量为一段HTML代码,其中有部分PHP变量和转义字符串。
而遇到这种状况,就不能很好的使用HTML代码提示,好比<p></p> 不能直接经过自动闭合等,一个一个的敲打键盘是一个很是苦力的事。
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