项目设置中的崇高主题

sublime theme in project settings

我有一些项目。我同时打开了几个 windows,我对它们感到困惑。 是否可以在项目设置中为每个项目设置自己的主题(设计)? 尝试

    {
    "folders":
    [
        {
            "path": "server"
        },
        {
            "path": "sources"
        }
    ],
    "settings":
    {
        "tab_size": 4,
        "save_on_focus_lost": true,
        "theme": "Adaptive.sublime-theme"
    }
}

它不起作用

无法根据 window 自定义主题,不。具体来说,项目特定设置只能包括 Editor Settings 而不是 User Interface SettingsApplication Behaviour 设置。

当您打开首选项 window 时,左侧窗格包含默认设置文件。文件顶部的设置是 Editor 设置;通过注释可以清楚地描述 User InterfaceApplication Behaviour 何时开始。

    // When drag_text is enabled, clicking on selected text will begin a
    // drag-drop operation. This is not currently implemented under Linux.
    "drag_text": true,

    //
    // User Interface Settings
    //

    // The theme controls the look of Sublime Text's UI (buttons, tabs, scroll bars, etc)
    "theme": "Default.sublime-theme",
    // Magnifies the entire user interface. Sublime Text must be restarted for
    // this to take effect. 1.0 is normal scale, 0.0 allows for auto-detection
    // based on text scale with older Linux configurations that don't fully
    // support GTK display scaling.
    "ui_scale": 0.0,

    //
    // Application Behavior Settings
    //

    // Exiting the application with hot_exit enabled will cause it to close
    // immediately without prompting. Unsaved modifications and open files will
    // be preserved and restored when next starting.
    //
    // Closing a window with an associated project will also close the window
    // without prompting, preserving unsaved changes in the workspace file
    // alongside the project.
    "hot_exit": true,

theme 设置是第一个 User Interface 设置,因此在项目特定设置中是不允许的。但是,您可以通过在每个 windows 中使用不同的 color_scheme 来使 windows 在视觉上截然不同。

事实上,您不能为每个项目自定义主题,但您可以通过自定义配色方案来解决您的问题。它位于您尝试放置 themesettings 部分下。所以你的 .sublime-project 文件可能看起来像这样:

{
    "folders":
    [
        {
            "path": "/path/to/my/project/"
        }
    ],
    "settings":
    {
        "color_scheme": "Packages/Visual Studio Dark/Visual Studio Dark.tmTheme",
    }
}

希望对你有用 ‍‍