一款可以对html、JS、CSS、PHP、python代码格式化的sublime插件

默认快捷键ctrl+alt+F,默认可以对html、js、css格式代码, 如果想对PHP格式化,需要PHP5.6以上版本,而且需要配置sublime的(package setttings > codeFormatter > settings user)中设定php.exe的路径 ,如下:

  "codeformatter_php_options":
{
"syntaxes": "php", // Syntax names which must process PHP formatter
"php_path": "C:/wamp/PHP5/php.exe", // Path for PHP executable, e.g. "/usr/lib/php" or "C:/Program Files/PHP/php.exe". If empty, uses command "php" from system environments
"format_on_save": false, // Format on save
"php55_compat": false, // PHP 5.5 compatible mode
"psr1": false, // Activate PSR1 style
"psr1_naming": false, // Activate PSR1 style - Section and 4.3 - Class and method names case
"psr2": true, // Activate PSR2 style
"indent_with_space": , // Use spaces instead of tabs for indentation
"enable_auto_align": true, // Enable auto align of = and =>
"visibility_order": true, // Fixes visibility order for method in classes - PSR- 4.2
"smart_linebreak_after_curly": true, // Convert multistatement blocks into multiline blocks // Enable specific transformations. Example: ["ConvertOpenTagWithEcho", "PrettyPrintDocBlocks"]
// You can list all available transformations from command palette: CodeFormatter: Show PHP Transformations
"passes": [], // Disable specific transformations
"exclude": []
},

Sublime Text 3 格式代码插件 codeFormatter的更多相关文章

  1. Sublime text 3 格式化代码 插件

    JsFormat: 重新打开sublime就能使用js格式化插件 使用方法: 1.快捷键:ctrl+alt+f 2.或者先用快捷键打开命令面板 “ctrl + shift + p”, 再输入 “For ...

  2. 安装Sublime Text 3汉化插件

    一.Sublime Text工具介绍: Sublime Text 是一个代码编辑器(Sublime Text 2是收费软件,但可以无限期试用),也是HTML和散文先进的文本编辑器.Sublime Te ...

  3. Sublime Text 中使用Git插件连接GitHub

    sublime Text的另一个强大之处在于它提供了非常丰富的插件,可以帮助程序员来适合大多数语言的开发.这些插件通过它自己的Package Controll(包管理)组件来安装,非常方便.一般常用的 ...

  4. 给Sublime Text 2安装CTags插件

    以Windows操作系统为例介绍安装过程: 安装ctags应用程序. 到CTags的官方网站下载最新版本,解压后将ctags.exe文件放到系统的搜索路径中. 安装Sublime Text 2的Pac ...

  5. 史上最全的 Sublime Text 汉化、插件安装合集

    0.前言 本文用于给新手小白用户指明前进方向.不用做商业推广. 其次,鼓舞购买正版.拒绝盗版. 好了.口号喊完,接下来就直接開始正文. 1. Sublime Text 介绍 首先在開始前,先来介绍一下 ...

  6. 2分钟 windows下sublime text 3安装git插件:

    12:35 2015/11/182分钟 windows下sublime text 3安装git插件:推荐博客:http://blog.csdn.net/naola2001/article/detail ...

  7. 10秒钟sublime text 3安装SVN插件

    注意:此处我提前已经安装了towerSVN,你可能需要提前安装好 towerSVN,之前安装redis之后我才明白,安装插件时安装软件好像 是一个必要的步骤,也就是说安装插件只是让你能在这里使用你已 ...

  8. Sublime Text 如何一个代码双屏显示代码上下部分?

    Sublime Text 如何一个代码双屏显示代码上下部分? sublime text如何一个代码双屏显示代码上下部分 先显示2行实图 把想要分屏显示的文件,打开新窗口,然后再拖过去就可以了. 快捷操 ...

  9. Sublime Text 3的常用插件的安装和介绍

    Sublime Text 3的插件安装流程 1.安装Sublime Text 3 2.Package Control组件在线安装: 按Ctrl+`或者点击View 下的show console调出co ...

随机推荐

  1. yii之srbac详解

    一.安装篇 1.下载http://www.yiiframework.com/extension/srbac/ 将解压得到的srbac文件夹放在moudles目录下. 2.在项目的主配置文件中mai.p ...

  2. Linux命令 &与&&的作用

    1.ls &表示后台服务 2.ls && ll 表示前者执行成功,执行后台命令

  3. c语言数组的操作

    #include<stdio.h> #include<malloc.h> #include<stdlib.h>//exit() struct Arr//定义了一个数 ...

  4. atexit()函数

    atexit()函数  头文件:#include<stdlib.h> 功 能: 注册终止函数(即main执行结束后调用的函数) 用 法: int atexit(void (*func)(v ...

  5. java 堆与栈的区别

    1. 堆与栈的区别? 1-1. 数据存放位置:   数据都存放于RAM (Random Access Memory). 1-2. 存放数据的类型:stack栈中保存方法中的基本数据类型(int, do ...

  6. [原博客] BZOJ 2725 : [Violet 6]故乡的梦

    这个题在bzoj上好像是个权限题,想做的可以去Vani的博客下载测试数据.这里有题面. 简单叙述一下题意:给你一个n个点.m条边的带权无向图,S点和T点,询问Q次删一条给定的边的S-T最短路. 其中  ...

  7. draw9patch超详细教程

    这篇文章是android开发人员的必备知识,内容摘选自网络,友我为大家整理和总结,不求完美,但是有用. 视频教程地址:http://player.youku.com/player.php/sid/XM ...

  8. 使用php-emoji类让网页显示emoji表情

    需要的材料: php-emoji类库的下载地址:https://github.com/iamcal/php-emoji 代码示例:(该代码来自官网) <?php include('emoji.p ...

  9. [OJ] Lowest Common Ancestor

    LintCode 88. Lowest Common Ancestor (Medium) LeetCode 236. Lowest Common Ancestor of a Binary Tree ( ...

  10. CentOS下date命令 - 显示和设置系统日期与时间

    显示系统日期 要显示系统日期,只要输入: $ date Thu Dec 5 22:55:41 WIB 2013 格式化显示日期 日期有很多格式.如果你不喜欢默认的格式,你可以换一种格式.你可能会想&q ...