默认情况下,VSCode的标签栏是滚动式的,当打开多个文件时是在同一行中显示的,想要选择查看某个文件时很不方便。
如果想要实现多行显示标签页,也是可以的,具体方法如下。
操作步骤:
1. 安装Custom CSS and JS Loader插件
2. 添加文件/Users/txy/.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即可,效果如下图所示
更多软件开发课程,请访问链接地址: https://edu.csdn.net/lecturer/2104 跟汤老师学开发