Vscode顯示多個文件&VSCode打開多個文件時實現標簽欄多行顯示


Vscode顯示多個文件

按ctrl+shift+P,在搜索框中輸入:setting.json,打開文件,輸入如下內容:

{
    "workbench.editor.showTabs": true,
    "workbench.editor.enablePreview": false,
}

 

VSCode打開多個文件時實現標簽欄多行顯示

默認情況下,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://blog.csdn.net/tangyang8941/article/details/107169763

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM