Sublime Text 3 在我保存时删除了我的 php 代码

Sublime Text 3 delete my php code when I save it

<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;

class AdminHomeController extends Controller
{
    public function index()
    {
      return view('AdminHome')->withPages(Page::all());
    }
}

当我按 ctrL+s 保存它时,一些代码被删除了。我不知道为什么,你能给我一个解决方案吗?

<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;

class AdminHomeController extends Controller {
    public function index() {
        return view('AdminHome')->withPages(Page::all());
    }
}

代码变成这样。

我为我的sublime text 3安装了包,如下图。我认为这是由 sublimeLinter 引起的,但我不知道如何修复它,我的用户设置如下: enter image description here

{
    "user": {
        "debug": false,
        "delay": 0.15,
        "error_color": "D02000",
        "gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
        "gutter_theme_excludes": [],
        "lint_mode": "load/save",
        "linters": {
            "php": {
                "@disable": false,
                "args": [],
                "excludes": []
            },
            "phplint": {
                "@disable": false,
                "args": [],
                "excludes": []
            }
        },
        "mark_style": "outline",
        "no_column_highlights_line": false,
        "passive_warnings": false,
        "paths": {
            "linux": [],
            "osx": [],
            "windows": [
                "D:\wamp64\bin\php\php7.0.4"
            ]
        },
        "python_paths": {
            "linux": [],
            "osx": [],
            "windows": []
        },
        "rc_search_limit": 3,
        "shell_timeout": 10,
        "show_errors_on_save": false,
        "show_marks_in_minimap": true,
        "syntax_map": {
            "html (django)": "html",
            "html (rails)": "html",
            "html 5": "html",
            "javascript (babel)": "javascript",
            "magicpython": "python",
            "php": "html",
            "python django": "python",
            "pythonimproved": "python"
        },
        "warning_color": "DDB700",
        "wrap_find": true
    }
}

这是我第一次在这个网站上提问,我来自中国,我的英语不是很好。

您的问题之前曾被 phpfmt 位用户报告过。在包 settings-> phpfmt -> setting - User 下,然后添加 "passes": ["OnlyOrderUseClauses"]。看看 this issue

更新:工作格式是"passes": "OnlyOrderUseClauses",,如@SHUIPING_YANG所述

我遇到了同样的问题,但无法弄清楚为什么 Sublime 总是删除我的 PHP use 语句;此外,在尝试解决问题时,我意识到我的 Sublime 软件包与您安装的软件包不同。期待一个,那就是 SublimeCodeIntel。我删除了它,按下 Ctrl + S 后,Sublime 不再删除 use 语句。