VSCODE设置文件标签栏换行

VSCODE设置文件标签栏换行_第1张图片

参考来源:https://www.cnblogs.com/zmj97/p/13079622.html

以下原文:

修改方法

1. 安装Custom CSS and JS Loader插件

2. 添加文件/Users/zmj/.vscode/tabs-wrapper.css

.title {
    height: auto !important;
}

.tabs-and-actions-container {
    display: block !important;
    height: auto !important;
}

.tabs-and-actions-container .monaco-scrollable-element {
    height: auto !important;
}

.tabs-container {
    overflow: initial !important;
    height: auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

.tabs-and-actions-container .editor-actions {
    position: fixed !important;
    right: 0 !important;
    z-index: 20 !important;
    bottom: 20px !important;
    background: #222 !important;
}

3. 在settings.json中添加:

"vscode_custom_css.imports": [
    "file:///Users/zmj/.vscode/tabs-wrapper.css"
],
"vscode_custom_css.policy": true,

4. cmd+shift+p呼出命令框,输入命令Reload Custom CSS and JS

5. 重启vscode

6. 完成!

个人补充:

我在linux系统中  .vscode文件夹位于用户文件夹  /home/kangzenan/.vscode

第三步应该 改为:

"vscode_custom_css.imports": [
    "file:///home/kangzenan/.vscode/tabs-wrapper.css"
],
"vscode_custom_css.policy": true,

运行第四部的时候VScode出现如下提示

"Run VS Code with admin privileges so the changes can be applied"

解决办法是输入命令修改vscode代码文件夹权限

sudo chown -R $(whoami)

$(whoami)是环境变量表示你的用户名,也可以直接输入用户名. 表示vscode的路径(安装路径?) 

例如我自己输入为

sudo chown -R kangzenan /usr/share/code

其他系统可能vscode的文件夹路径有所不同, Custom CSS and JS Loader插件文档中给出了说明:

Windows users

In Windows, make sure you run your VS Code in Administrator mode before enabling or disabling your custom style!

Mac and Linux users

The extension would NOT if Code cannot modify itself. The cases include:

  • Code files being read-only, like on a read-only file system or,
  • Code is not started with the permissions to modify itself.

You need to claim ownership on Code's installation directory, by running this command:

sudo chown -R $(whoami)

The placeholder  means the path to VSCode installation. It is typically:

  • /Applications/Visual Studio Code.app/Contents/MacOS/Electron, on MacOS;
  • /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron, on MacOS when using Insiders branch;
  • /usr/share/code, on most Linux;
  • /opt/visual-studio-code/ on Arch Linux.

Mac and Linux package managers may have customized installation path. Please double check your path is correct.

你可能感兴趣的:(随笔)