Visual Studio Code 1.38.1:如何设置水平拆分编辑器?原设置项已消失
How to Set Horizontal Editor Split in VS Code 1.38.1+
Hey there, I’ve run into this exact setting shift in VS Code before—let me walk you through how to get your preferred horizontal split working now that the old config entries have been updated.
VS Code overhauled some editor layout settings around version 1.38, which is why the workbench.editor options you remembered aren’t visible anymore. Here’s what to do instead:
1. Use the Settings GUI (Simple Click-and-Go)
- Open the Settings panel with the shortcut
Ctrl+,(Windows/Linux) orCmd+,(Mac), or via File > Preferences > Settings (Windows/Linux) / Code > Preferences > Settings (Mac). - In the top search bar, type
default split direction(or the exact setting nameworkbench.editor.defaultSplitDirection). - From the dropdown menu next to this setting, select
horizontal. Now any new editor splits you create will default to horizontal layout, so you can view/edit the current line and earlier content side-by-side vertically.
2. Edit settings.json Directly (For Power Users)
If you prefer tweaking the raw configuration file:
- Open the Settings panel as above, then click the curly braces
{}icon in the top-right corner to opensettings.json. - Add or update this line in the JSON object:
"workbench.editor.defaultSplitDirection": "horizontal" - Save the file, and your new default split direction will take effect right away.
Bonus: Temporary Horizontal Split (No Default Change)
If you just need a one-time horizontal split without altering your default setup:
- Right-click on the editor tab you want to split, then select Split Editor Down.
- Or use the keyboard shortcut:
Ctrl+K Ctrl+\(Windows/Linux) /Cmd+K Cmd+\(Mac) to split horizontally quickly.
内容的提问来源于stack exchange,提问作者Jeb50
相关产品推荐
相关产品推荐

