2019独角兽企业重金招聘Python工程师标准>>>

Sublime Text 2 has the concept of build systems. This basically means that if you are editing a Python file then you can run the Python interpreter on the source file your are editing and see the output in a console window, all without having to leave the Sublime editor. It’s surprising how much quicker and easier this is compared to having to leave Sublime to swap to a separate console window.

This is Sublime’s Tools->Build System menu

Surprisingly, there is no supplied build system for PHP, to add one go to “New Build System”. A new tab opens for file untitled.sublime-build with the following in it:

<!-- lang: js -->
{ “cmd”: [“make”] }

Delete that and replace it with this:

<!-- lang: js -->
{ “cmd”: [“php”, “$file”], “file_regex”: “php$”, “selector”: “source.php” }

And save the file. Sublime will pop up the file save dialog, which defaults to the directory that Sublime uses for its user-generated config files, so don’t change the directory, just save this file as php.sublime-build. Now, when you edit a file whose name ends with php (as specified by the “php$” regex in the config file) you will have a build system available. You can now hit CTRL+B and the PHP interpreter will run against your source file and the output appears in a Sublime Text window.

The grey window shows the output of the PHP interpreter and the time it took to run.

转载于:https://my.oschina.net/lujian863/blog/182621

Sublime Text 2 中运行 PHP相关推荐

  1. C++代码在Sublime Text 3中编译和运行

    Sublime Text 3中编译和运行 前言 以下可以避免因编码问题导致的乱码现象 前言 在数据结构代码的编写中,我选用了优秀的编辑器Sublime Text 3,但是在实现C++代码的编译和运行上 ...

  2. Sublime Text 3中配置编译和运行Java的两个方法

    方法一: 打开Sublime Text 3,依次点击Preference, Browse Packages,在打开的窗口中双击User文件夹,新建文件JavaC.sublime-build,用记事本打 ...

  3. sublime c 语言 编译,默认情况下,将程序编译为Sublime Text 3中的c 14

    我知道我们可以使用g编译器将程序编译为C.但是g编译器默认为98版本.要将其作为C 14运行,我们需要在终端中添加-std = c 14. Sublime Text因其重量轻和功能而被认为是有竞争力的 ...

  4. sublime text 3 中改变.vue文件的颜色

    1.按 Ctrl+Shift+P 2.输入install,选择install Package 3.输入vue,选择 vue syntax hightlight 如果上述方法不起作用,可以选择在下面连接 ...

  5. Sublime Text 2 中怎样查找scope的名称

    在Sublime Text 2中新增一个snippet时需要在配置文件中输入scope节点的值来限制snippet使用的语法范围(作用域),这个scope的值可以通过以下方法获得: 进入包所在目录,如 ...

  6. sublime text 3 中的php代码语法检测

    sublime text 3 中存在一个php 代码语法检测的插件,如果在sublime中编写php代码出现了语法错误,可以在左侧出现红色的提示标志: 如图所示: 那么这样的效果在sublime编辑器 ...

  7. Sublime Text 2中的正则表达式搜索替换

    本文翻译自:Regular expression search replace in Sublime Text 2 I'm looking to do search replace with regu ...

  8. php在浏览器输入路径,关于在sublime text 3 中配置一键浏览器打开php文件,并且是在localhost 本地服务器路径下...

    如题,如何在sublime text 3 中配置出像dreamweaver 中那样的通过f12快捷键来在浏览器打开浏览php文件,而且是在localhost路径下. 在segmentfault得到一个 ...

  9. Sublime Text 3中SublimeLinter的使用

    关于Sublime  Text 2中的SublimeLinter的使用网上多如牛毛,基本上不会遇到什么问题,简单的讲一下关于Sublime Text 3中遇到的问题: 1.通过package cont ...

最新文章

  1. 员工未回复群消息被罚200元,企业:符合公司规章制度
  2. FPGA之道(1)HDL代码风格
  3. Spring Cloud 学习资料收集
  4. 深度学习-清晰易懂的马尔科夫链原理介绍
  5. html设计一张试卷算分,HTML试卷10班分享[共5页].doc
  6. ServiceStack.Ormlit 事务
  7. Feature Engineering 特征工程 2. Categorical Encodings
  8. not support mysql_MYSQL出现quot; Client does not support authentication quot;的解决方法
  9. android 右边抽屉,android – 抽屉在右侧抽屉中切换
  10. node 更新_ESLint v7.0.0 发布:不再支持 Node.js v8
  11. 【C++常用函数】isalpha、isalnum、isdigit、islower、isupper用法
  12. Linux学习3 :用户及文件权限管理
  13. Kernel同步机制的底层实现
  14. c语言里strcpy作用是什么,strcpy函数的作用是什么?
  15. Windows无法完成格式化U盘终结解决方法
  16. 起底野蛮成长的腾讯共享wifi赚钱小程序,到底是机遇还是陷阱?
  17. 猴子吃桃问题:(非常简单易懂的方法)
  18. javaScript有一个棋盘,有64个方格,在第一个方格里面放1粒芝麻重量是0.00001kg,第二个里面放2粒,第三个里面放4,棋盘上放的所有芝麻的重量。
  19. QEMU 网络配置一把梭
  20. C++中的volatile(Primer读书笔记)

热门文章

  1. Python数据分析Numpy库方法简介(三)
  2. SparkSQL 之 Shuffle Join 内核原理及应用深度剖析-Spark商业源码实战
  3. 简单分析Guava中RateLimiter中的令牌桶算法的实现
  4. Exchange 2016部署实施案例篇-01.架构设计篇(上)
  5. PHP:6种GET和POST请求发送方法
  6. oracle数据本机自动备份
  7. OC开发_Storyboard——MapKit
  8. POJ 3181 Dollar Dayz DP
  9. 菜鸟小编对云计算的一点猜想
  10. 多种方法解决Exchange 2010 EMC批量启用邮箱之后出..