zoukankan      html  css  js  c++  java
  • Sublime text3 016 SublimeLinter(PHP 代码检测)

    Sublime text3 016 SublimeLinter(PHP 代码检测)
    ------------------------------------------------------------------------------
    如果有什么不明白的,加QQ群:186970878

    经常会有错字 或 语句不通的,欢迎联系本人,方便快速修正,也方便后来者阅读。

    联系本人QQ: 2071551682
    ------------------------------------------------------------------------------
    ----------------------- PHP 代码检查 -----------------------------

    使用 SublimeLinter 进行PHP代码检查

    需要下载 sublimelinter 和 SublimeLinter-php


    sublimelinter 用于高亮提示用户编写的代码中存在的不规范和错误的写法,支持 JavaScript、CSS、HTML、Java、PHP、Python、Ruby 等十多种开发语言。


    SublimeLinter-php 使用的是 php -l 进行的检查。
    This linter plugin for SublimeLinter provides an interface to php -l. It will be used with files that have the “PHP”, “HTML”, or “HTML 5” syntax.


    ------------ SublimeLinter下载地址:----------------
    https://packagecontrol.io/packages/SublimeLinter

    VERSIONS 
    ST3   4.6.4
    ST2   1.8.0
    HOMEPAGE sublimelinter.com

    http://www.sublimelinter.com/en/stable/

    SublimeLinter repo and issues can be reached on GitHub. 
    点击:GitHub  进入下网页

    https://github.com/SublimeLinter/SublimeLinter

    Clone or download  >  Download ZIP

    https://github.com/SublimeLinter/SublimeLinter.git

    得到的文件:SublimeLinter-master.zip
    文件修改时间 2018 6 4


    ----------  SublimeLinter - PHP -----

    https://packagecontrol.io/packages/SublimeLinter-php

    https://github.com/SublimeLinter/SublimeLinter-php
    Clone or download  >  Download ZIP
    https://github.com/SublimeLinter/SublimeLinter-php.git

    得到的文件:  SublimeLinter-php-master.zip
    文件修改时间 2018  4  20
    ----------------------------------------------------

    SublimeLinter 安装


    提示信息:

    Package Control Messages
    ========================

    SublimeLinter
    -------------

     
        ____        _     _ _                _     _       _
       / ___| _   _| |__ | (_)_ __ ___   ___| |   (_)_ __ | |_ ___ _ __
       \___ | | | | '_ | | | '_ ` _ / _ |   | | '_ | __/ _ '__|
        ___) | |_| | |_) | | | | | | | |  __/ |___| | | | | ||  __/ |
       |____/ \__,_|_.__/|_|_|_| |_| |_|\___|_____|_|_| |_|\__\___|_|
     
     
      Welcome to SublimeLinter, a linter framework for Sublime Text 3.
      Linters are not included, they must be installed separately.
     
     
      For complete documentation on how to use and configure SublimeLinter,
      please see: http://www.sublimelinter.com
     
      To report issues: https://github.com/SublimeLinter/SublimeLinter

    -----------------------------------

    SublimeLinter-php 安装

    提示信息:

    SublimeLinter-php
    -----------------

      SublimeLinter-php
      -------------------------------
      This linter plugin for SublimeLinter provides an interface to php -l.
     
      Please read the installation instructions at:
     
      https://github.com/SublimeLinter/SublimeLinter-php

    ====================================================
    安装 sublimelinter 和 sublimelinter-php
    SublimeLinter配置.依次点击

    Menu   Preferences  ->  Package Settings  ->  SublimeLinter  ->  Settings 。

    如果User为空复制一份 Default 中的内容到 User


    右边 User 参照 左边 Default 语法:

    -----------------  复制代码 ----------------
    // SublimeLinter Settings - User
    {

        "paths": {
            "linux": [],
            "osx": [],
            "windows": [
                    "D://wamp64//bin//php//php5.6.25//php.exe",
                    "D://wamp64//bin//php//php7.0.10//php.exe"
            ]
        },
    }

    -----------------  复制代码  ---------------

    测试成功 !!!
    ------------------------------------------------------

    -------------------  检查 设置说明  --------------------

    什么状态下进行检查的 设置说明。

        // Lint Mode determines when the linter is run.   
    // Lint Mode    确定何时运行linter

        // - background: asynchronously on every change  
    // background      异步地每一个变化

        // - load_save: when a file is opened and every time it's saved  
    // load_save    当一个文件被打开,并且每次它被保存。

        // - manual: only when calling the Lint This View command
    // manual 只有在调用 Lint 这个视图命令时


        // - save: only when a file is saved
    //   save 只有当文件被保存时

    // 下面是默认设置
        "lint_mode": "background",


    如果想更改调试方式,Default 复制到 User 文件中重新定义。

    --------------------- 支持 语法提示 sublime-phpcs  --------------------

    下载插件 sublime-phpcs

    和上面那两个 插件是一个网站:
                        https://github.com/benmatselby/sublime-phpcs

    解压后修改文件夹名字为:phpcs

    把文件夹放到packages目录下


    ctrl+shift+p  ->  install package

    Sublime 自动对齐插件:alignment

    BracketHighlighter 高亮显示匹配的括号、引号和标签

    BracketHighlighter这个插件能在左侧高亮显示匹配的括号、引号和标签,能匹配


    ------------------------------------------------------------------------------
    如果有什么不明白的,加QQ群:186970878

    经常会有错字 或 语句不通的,欢迎联系本人,方便快速修正,也方便后来者阅读。

    联系本人QQ: 2071551682
    ------------------------------------------------------------------------------

  • 相关阅读:
    webpack打包踩坑记录
    node笔记
    你真的会Xilinx FPGA的复位吗?
    Verilog 99题之001-009
    数字电路基础
    跨时钟域处理
    时序逻辑电路基础
    FPGA&ASIC基本开发流程
    关于FPGA的一些小见解
    基于FPGA的I2C读写EEPROM
  • 原文地址:https://www.cnblogs.com/qy123/p/9190849.html
Copyright © 2011-2022 走看看