什么是核素| 咸鱼什么意思| 喝酒手掌发红是什么原因| 红底白杠是什么标志| 什么是生理期| 梦见很多蛇是什么征兆| 右眼皮上长痣代表什么| 肚子胀不消化吃什么药| 刘少奇属什么生肖| 土字生肖有钱收是什么生肖| 虾皮是什么虾| 经常呛咳是什么病的征兆| 以讹传讹什么意思| ochirly是什么牌子| 为什么眼睛会红| 樱花的花语是什么| 血小板压积是什么意思| 牙痛吃什么| 肚子经常胀气什么原因| 周知是什么意思| 骆驼吃什么| 什么的歌| 忘带洗面奶用什么代替| 血铅是什么| 簇新是什么意思| 宫颈常大是什么意思| 甘露醇是什么| 仁慈是什么意思| 胀气是什么症状| 美团是干什么的| 孔雀开屏什么意思| 灵芝孢子粉有什么作用| 张钧甯为什么读mi| 五台山是求什么的| 圣诞节什么时候| 毒瘾发作有什么症状| 名落孙山的意思是什么| 肾漏蛋白是什么病| 淋巴细胞绝对值偏高是什么原因| c14检查前需要注意什么| 舌苔厚有齿痕吃什么药| 肺结节吃什么中成药| 军师是什么意思| 1945年是什么年| 三天没有大便是什么原因| 85年属什么| 718是什么星座| 性交是什么| 传媒公司是干什么的| 黑匣子是什么颜色| 扁平疣是什么| cmr医学中什么意思| 羊水暗区是什么意思| 早上5点是什么时辰| BCG是什么意思| 肝癌晚期什么症状| 7月6日是什么节日| brunch是什么意思| 外泌体是什么| 1938年属什么| 白头翁是什么动物| 胸推是什么意思| 金铃子是什么昆虫| 下身有异味用什么药| 梦见背小孩是什么意思| 香港买什么便宜| 不是省油的灯是什么意思| c919是什么意思| 右手臂酸痛是什么前兆| 神经元特异性烯醇化酶偏高是什么意思| 母亲o型父亲b型孩子是什么血型| 容易水肿是什么原因| 次胖是什么意思| 润月是什么意思| 宫颈纳氏囊肿是什么| 碧玉五行属什么| 流产吃什么药| 前列腺增生有什么症状表现| 光脚走路有什么好处| 铁锚是什么意思| 椰子水有什么功效| 吴用的绰号是什么| 心脏病吃什么食物好| 姑妈的老公叫什么| 喝鲜羊奶有什么好处和坏处| 卵黄囊是什么意思| 蜈蚣代表什么生肖| 一级医院是什么意思| 心脏突然剧烈跳动是什么原因| 潴留是什么意思| 做b超挂什么科| 烂舌头是什么原因| 满五唯一的房子要交什么税| 碘是什么东西| 梦见自己哭了是什么意思| 唐玄宗叫什么| 白细胞偏低有什么症状| 牙结石不除有什么危害| 太乙是什么意思| 不良于行是什么意思| 专科警校出来干什么| 木薯粉是什么| 未见明显血流信号是什么意思| 阑尾炎检查什么项目| 叫姑姑是什么关系| 沙茶酱是什么做的| 屏蔽一个人意味着什么| 为什么便秘| 促什么谈什么| 10月16日是什么星座| 曙光是什么意思| 肝火大吃什么药| 腹泻肚子疼吃什么药| 什么叫cd| 胸痛一阵一阵的痛什么原因| 二氧化碳低是什么原因| 直肠指检能检查出什么| 什么名字好听男生| 胃痛挂什么科| 胸腔积液挂什么科| 体细胞是什么意思| 头顶痛吃什么药效果好| 56年属什么生肖| 结甲是什么意思| 头经常晕是什么原因| 介石是什么意思| rip什么意思| 火山为什么会喷发| 腺癌是什么原因引起的| 气虚吃什么中药| 眼睛干涩是什么原因引起的| 指责的意思是什么| 单病种是什么意思| 经期缩短是什么原因| 先父遗传是什么意思| 术后吃什么刀口恢复得快| 观音菩萨成道日是什么意思| 乐观是什么意思| 冰箱底部漏水是什么原因| 手足无措的意思是什么| 血沉高忌口什么| 骨骼清奇什么意思| 喝酸梅汤有什么好处| 什么的秋天| 火山为什么会喷发| 5月26是什么星座| 白凉粉是什么| 紫苏叶是什么| 驹是什么意思| 画代表什么生肖| ca724是什么意思| 什么人不能种生基| 双鱼座是什么象星座| 姿态万千的意思是什么| 月经安全期是什么时候| 开瑞坦是什么药| 12345是什么投诉电话| 1998年的虎是什么命| 画蛇添足的寓意是什么| 什么是疤痕增生| 政治面貌是什么意思| 鱼有念什么| 洪七公什么生肖| 注意身体是什么意思| 2019年出生属什么生肖| 湿疹怎么治用什么药膏| 什么叫数字货币| 头部神经痛吃什么药好| 泡奶粉用什么水最好| 家里有壁虎是什么征兆| 结缔组织病是什么病能治愈吗| 宫腔镜是什么| 利多卡因是什么| 手经常发麻是什么原因| rbc是什么意思医学| 洁面慕斯和洗面奶有什么区别| 什么的河水填词语| 结婚的礼数都有什么| 事急从权是什么意思| 病毒四项检查都有什么| 六月初九是什么星座| 前壁后壁有什么区别| 什么是应届毕业生| 11月13日什么星座| 瘢痕是什么| 得宝松是什么药| 14年婚姻是什么婚| 白头发有什么方法变黑| 嗓子哑是什么病的前兆| 迎春花什么时候开花| 7月29是什么星座| 支气管炎咳嗽吃什么药好得快| 梦见床上有蛇什么预兆| 罗非鱼吃什么| 胸椎退变是什么意思| 三七草长什么样| 重本是什么意思| 豆面是什么| 小孩感冒吃什么药| 22是什么生肖| 先敬罗衣后敬人是什么意思| babycare是什么牌子| 做亲子鉴定需要什么东西| 为什么抽血要空腹| 吹风扇感冒了吃什么药| 脚气是什么症状| 奇经八脉指的是什么| 手指关节疼痛挂什么科| 50是什么意思| rb是什么| 什么人不能吃西瓜| 女性分泌物增多发黄是什么原因| yrc是什么牌子的鞋| 房客是什么意思| 自给自足是什么意思| 什么牌子的麦克风好用| 腰痛什么原因| 糕面是什么面| 什么吹风机好用| 县人大主任是什么级别| 做梦梦见前男友是什么意思| 儿童上火吃什么药最好| iwc手表是什么牌子| 红薯什么季节成熟| 人的脾脏起什么作用| 做心电图挂什么科| 夏天不出汗是什么原因| 什么叫雷达| 试纸什么时候用最准确| 风疹病毒igg阳性是什么意思| 六味地黄丸有什么作用| 花千骨最后结局是什么| 氯喹是什么药| 皮肤松弛是什么原因造成的| 冷藏和冷冻有什么区别| 热泪盈眶的盈是什么意思| 半月板退变是什么意思| 置之死地而后生是什么意思| 放荡不羁爱自由什么意思| 轻度脂肪肝吃什么药| 432是什么意思| emo是什么意思| 大便每天四五次是什么病| 舌下含服是什么意思| 荷里活什么意思| 癸丑五行属什么| 早上起来口苦是什么原因| 211和985什么意思| 医院什么时候上班| 大姨妈延迟是什么原因| 什么是白内障症状| 转氨酶高是怎么回事有什么危害| 奇门遁甲什么意思| 九个口是什么字| 鼻子发痒是什么原因引起的| 尿酸碱度是什么意思| 七夕节什么时候| 为什么手会掉皮| 强盗是什么意思| 夏天吃羊肉有什么好处| 骨龄什么时候闭合| hp是什么意思| 心脑供血不足吃什么药效果最好| 请多指教是什么意思| 百度

Try to extend agent mode in VS Code!

质检资讯区--旅游频道

百度   担任《中华耳科学杂志(中文版)》编委,《ChineseJournalofOtology(Englishversion)》编委,《国际耳鼻咽喉头颈外科杂志》编委;《中国耳鼻咽喉颅底外科杂志》常务编委。

At its heart, Visual Studio Code is a code editor. Like many other code editors, VS Code adopts a common user interface and layout of an explorer on the left, showing all of the files and folders you have access to, and an editor on the right, showing the content of the files you have opened.

Basic layout

VS Code comes with a simple and intuitive layout that maximizes the space provided for the editor, while leaving ample room to browse and access the full context of your folder or project. The user interface is divided into six main areas:

  • Editor - The main area to edit your files. You can open as many editors as you like side by side vertically and horizontally.
  • Primary Side Bar - Contains different views like the Explorer to assist you while working on your project.
  • Secondary Side Bar - Opposite the Primary Side Bar. By default, contains the Chat view. Drag and drop views from the Primary Side Bar to the Secondary Side Bar to move them.
  • Status Bar - Information about the opened project and the files you edit.
  • Activity Bar - Located on the far left-hand side. Lets you switch between views and gives you additional context-specific indicators, like the number of outgoing changes when Git is enabled. You can change the position of the Activity Bar.
  • Panel - An additional space for views below the editor region. By default, it contains output, debug information, errors and warnings, and an integrated terminal. The Panel can also be moved to the left or right for more vertical space.

Screenshot of the VS Code user interface, highlighting the main areas.

Each time you start VS Code, it opens up in the same state it was in when you last closed it. The folder, layout, and opened files are preserved.

Open files in each editor are displayed with tabbed headers (Tabs) at the top of the editor region. To learn more about tabbed headers, see the Tabs section.

Tip

You can move the Primary Side Bar to the right hand side by right-clicking the Activity Bar and selecting Move Primary Side Bar Right or toggle its visibility (?B (Windows, Linux Ctrl+B)).

Learn more about using Primary and Secondary Side Bar.

Side by side editing

You can open as many editors as you like side by side vertically and horizontally. If you already have an editor open, there are multiple ways of opening another editor to the side:

  • Alt and select a file in the Explorer view.
  • ?\ (Windows, Linux Ctrl+\) to split the active editor into two.
  • Open to the Side (?Enter (Windows, Linux Ctrl+Enter)) from the Explorer context menu on a file.
  • Select the Split Editor button in the upper right of an editor.
  • Drag and drop a file to any side of the editor region. Hold Ctrl (Option on macOS) while dragging to copy the tab instead of moving it.
  • Press ?Enter (Windows, Linux Ctrl+Enter) in the Quick Open (?P (Windows, Linux Ctrl+P)) file list.

Side by Side editing

When you open another file, the editor that is active will display the content of that file. If you have two editors side by side and you want to open file 'foo.cs' into the right-hand editor, make sure that this editor is active (by clicking inside it) before opening file 'foo.cs'.

By default, editors open to the right-hand side of the active one. You can change this behavior with the workbench.editor.openSideBySideDirection setting to open new editors to the bottom of the active one instead.

When you have more than one editor open, you can switch between them quickly by holding the Ctrl key (Cmd on macOS) and pressing 1, 2, or 3.

Tip

You can resize editors and reorder them. Drag and drop the editor title area to reposition or resize the editor.

Editor groups

When you split an editor (using the Split Editor or Open to the Side commands), a new editor region (edit group) is created which can hold a group of items. You can open as many editor groups as you like side by side vertically and horizontally.

You can see these clearly in the Open Editors section at the top of the Explorer view (toggle ... > Open Editors in the Explorer view).

tabs editor groups

You can drag and drop editor groups on the workbench, move individual tabs between groups, and quickly close entire groups (Close All).

Note

VS Code uses editor groups whether or not you have enabled tabs. Without tabs, editor groups are a stack of your open items with the most recently selected item visible in the editor pane.

Split in group

You can split the current editor without creating a new editor group with the View: Split Editor in Group command (?K ??\ (Windows, Linux Ctrl+K Ctrl+Shift+\)). To learn more about this editor mode and specific commands for navigating between the two sides, you can read the section in the Custom Layout article.

Floating windows

You can move editors, the terminal, or specific views into their own floating windows. This is useful if you have a multi-monitor setup and want to keep a file open on a different monitor.

Screenshot that shows the OS desktop with VS Code window and a CSV file opened in a floating window.

Drag an editor tab out of the current VS Code window to open it in a floating window. Alternatively, use the Move into New Window or Copy into New Window context options from the editor tab.

To pin a floating window to the top of the screen, select the Set Always on Top option (pin icon) from its title bar.

To learn more about floating windows, read the section in the Custom Layout article.

Minimap

A Minimap (code outline) gives you a high-level overview of your source code, which is useful for quick navigation and code understanding. A file's minimap is shown on the right side of the editor. You can select or drag the shaded area to quickly jump to different sections in your file.

If you have folding markers in the editor, such as //#region or MARK: comments, then the minimap shows the folding marker names.

minimap

Tip

You can move the minimap to the left hand side or disable it completely by respectively setting "editor.minimap.side": "left" or "editor.minimap.enabled": false in the user or workspace settings.

Sticky Scroll

Sticky Scroll shows the starting lines of currently visible nested scopes at the top of the editor. It facilitates navigation by indicating where you are in a file and lets you quickly jump back to the top of the current scope.

stickyScroll

Tip

You can enable/disable Sticky Scroll with the editor.stickyScroll.enabled setting.

Sticky Scroll uses several different content models to create its headings. It is possible to choose between the outline provider model, the folding provider model, and the indentation model to determine which lines to display in the Sticky Scroll area. If a model is not available for the current language, VS Code falls back to the next model in the order given above. The default model initially used comes from the editor.stickyScroll.defaultModel setting.

Indent guides

The editor shows indentation guides (vertical lines) which help you quickly see matching indent levels. If you would like to disable indent guides, you can set editor.guides.indentation to false in your user or workspace settings.

Breadcrumbs

The editor has a navigation bar at the top, also called breadcrumbs. Breadcrumbs always show the file path and, if the current file type has language support for symbols, the symbol path up to the cursor position. The breadcrumbs enable you to quickly navigate between folders, files, and symbols.

Breadcrumbs

You can disable breadcrumbs with the View > Appearance > Toggle Breadcrumbs menu item or the View: Toggle Breadcrumbs command. For more information about the breadcrumbs feature, such as how to customize their appearance, see the Breadcrumbs section of the Code Navigation article.

Explorer view

The Explorer view is used to browse, open, and manage the files and folders in your project. VS Code is file and folder based and you can get started immediately by opening a file or folder in VS Code.

After you open a folder in VS Code, the contents of the folder are shown in the Explorer view. You can do many things from here:

  • Create, delete, and rename files and folders.
  • Move files and folders with drag and drop.
  • Use the context menu to explore all options.
Tip

You can drag and drop files into the Explorer view from outside VS Code to copy them. If the explorer is empty, VS Code opens the files instead. You can also copy-paste files from outside VS Code into the Explorer view. With the explorer.autoOpenDroppedFile setting, you to configure whether to automatically open the file or not.

VS Code works well with other tools that you might use, especially command-line tools. If you want to run a command-line tool in the context of the folder you currently have open in VS Code, right-click the folder and select Open in Integrated Terminal.

You can also navigate to the location of a file or folder in the native operating system file explorer by right-clicking on a file or folder and selecting Reveal in File Explorer on Windows, Reveal in Finder on macOS, or Open Containing Folder on Linux.

Tip

Type ?P (Windows, Linux Ctrl+P) (Quick Open) to quickly search and open a file by its name.

By default, VS Code excludes some folders from showing in the Explorer view, such as .git. Use the files.exclude setting to configure rules for hiding files and folders from the Explorer view.

Tip

You can hide derived resources files, like *.meta in Unity, or *.js in a TypeScript project. For Unity to exclude the *.cs.meta files, the pattern to choose would be: "**/*.cs.meta": true. For TypeScript, you can exclude generated JavaScript for TypeScript files with: "**/*.js": {"when": "$(basename).ts"}.

Multi-selection

You can select multiple files in the Explorer view and Open Editors section to run actions (delete, drag and drop, or open to the side) on multiple items. Hold Ctrl (Cmd on macOS) and select individual files, or hold Shift to select a range of files. If you select two items, you can now also use the context menu Compare Selected command to quickly diff two files.

Note

In earlier VS Code releases, clicking with the Ctrl (Cmd on macOS) key pressed, would open a file in a new editor group to the side. If you still want this behavior, you can use the workbench.list.multiSelectModifier setting to change multi-selection to use the Alt key.

"workbench.list.multiSelectModifier": "alt"

Advanced tree navigation

You can filter the files and folders in the Explorer view. With the focus on the Explorer view, press ??F (Windows, Linux Ctrl+Alt+F) to open the Find control and type part of the file or folder name you want to match. This navigation feature is available for all tree views in VS Code.

Pressing the Filter button toggles between the two modes: highlighting and filtering. Pressing Down lets you focus on the first matched element and navigate to subsequent matching elements. In highlighting mode, a badge is shown on folders to indicate that they contain matched files.

Pressing the Fuzzy Match button toggles between exact and fuzzy matching, where you can type a sequence of characters to match any part of the file or folder name.

Filtering files in the File Explorer

Outline view

The Outline view is a separate section at the bottom of the Explorer view. When expanded, it shows the symbol tree of the currently active editor.

Outline view

The Outline view has different Sort By modes, optional cursor tracking, and supports the usual open gestures. It also includes an input box to find or filter. Errors and warnings are also shown in the Outline view, letting you see at a glance a problem's location.

For symbols, the view relies on information computed by your installed extensions for different file types. For example, the built-in Markdown support returns the Markdown header hierarchy for a Markdown file's symbols.

Markdown Outline view

There are several Outline view settings. Search for settings starting with outline. and to configure what information is shown in the Outline view.

Timeline view

The Timeline view, accessible at the bottom of the File Explorer, is a unified view for visualizing the events history for a file. For example, you can view Git commits or local file saves in a timeline view.

Timeline view

A filter action in the Timeline view toolbar enables you to filter between source control events and local file events:

Timeline filter drop down with Git History unchecked and Local History checked

Local file history

Depending on your settings, every time you save an editor, a new entry is added to the list. Each local history entry contains the full contents of the file at the time the entry was created and in certain cases, can provide more semantic information (for example, indicate a refactoring).

From an entry you can:

  • Compare the changes to the local file or previous entry.
  • Restore the contents.
  • Delete or rename the entry.
Tip

If you've accidentally deleted a file, you can restore it from the local history by using the ... > Local History: Find Entry to Restore action in the Timeline view, and then select your file from the Quick Pick.

You can configure these settings for working with the local history:

Commit history

VS Code's built-in Git support provides the Git commit history of the specified file. Selecting a commit will open a diff view of the changes introduced by that commit. When you right-click on a commit, you'll get options to Copy Commit ID and Copy Commit Message.

When you right-click a commit in the history, you can:

  • Open Changes - Open a diff view of the changes in the file.
  • View Commit - Open a multi-file diff view to view the changes for all files in the commit.
  • Select for Compare - Select an entry to compare with another entry.
  • Copy Commit ID - Copy the commit ID to the clipboard.
  • Copy Commit Message - Copy the commit message to the clipboard.

You can configure this setting for working with the Git history:

Views

The Explorer view is only one of the views available in VS Code. There are also views for:

  • Search - Provides global search and replace across your open folder.
  • Source Control - VS Code includes Git source control by default.
  • Run - VS Code's Run and Debug View displays variables, call stacks, and breakpoints.
  • Extensions - Install and manage your extensions within VS Code.
  • Custom views - Views contributed by extensions.
Tip

You can open any view using the View: Open View command.

views

You can show or hide views by right-clicking the Activity Bar, and reorder them by using drag and drop. Within the Explorer view, you can show or hide sections via the '...' menu, or drag and drop sections to reorder them.

Command Palette

VS Code is equally accessible from the keyboard. The most important key combination to know is ??P (Windows, Linux Ctrl+Shift+P), which brings up the Command Palette. From here, you have access to all functionality within VS Code, including keyboard shortcuts for the most common operations.

Command Palette

The Command Palette provides access to many commands. You can run editor commands, open files, search for symbols, and see a quick outline of a file, all using the same interactive window. Here are a few tips:

  • ?P (Windows, Linux Ctrl+P) enables you to navigate to any file or symbol by typing its name
  • ?Tab (Windows, Linux Ctrl+Tab) cycles you through the last set of files opened
  • ??P (Windows, Linux Ctrl+Shift+P) brings you directly to the editor commands
  • ??O (Windows, Linux Ctrl+Shift+O) enables you to navigate to a specific symbol in a file
  • ?G (Windows, Linux Ctrl+G) enables you to navigate to a specific line in a file

Type ? in the input field to get a list of available commands that you can run from the Command Palette.

Quick Open Help

Tip

You can move the Command Palette to another location by grabbing the top edge with the mouse cursor and dragging it somewhere else. You can also select the Customize Layout control in the title bar, and then select one of the preconfigured Quick Input Positions.

Screenshot that shows the Command Palette in a different location, highlighting the Customize Layout control in the title bar and the preconfigured position options.

Configure the editor

VS Code gives you many options to configure the editor. From the View > Appearance menu, you can hide or toggle various parts of the user interface, such as the Side Bar, Status Bar, and Activity Bar.

Hide the menu bar (Windows, Linux)

You can hide the menu bar on Windows and Linux by changing the setting window.menuBarVisibility from classic to toggle or hidden. A setting of toggle means that a single press of the Alt key shows the menu bar again.

You can also hide the menu bar on Windows and Linux with the View: Toggle Menu Bar command. This command sets window.menuBarVisibility from classic to compact, resulting in the menu bar moving into the Activity Bar. To return the menu bar to the classic position, you can run the View: Toggle Menu Bar command again.

Settings

Most editor configurations are managed in settings, which you can modify directly. You can set options either globally through user settings, or per project/folder through workspace settings. Settings values are stored in a settings.json file.

You can view and edit settings in the Settings Editor (select File > Preferences > Settings, or press ?, (Windows, Linux Ctrl+,)). Use the User and Workspace tab to switch between user and workspace settings. You can filter settings by using the search box at the top.

Alternately, you can modify the user settings directly in the settings.json file. Use the Preferences: Open User Settings (JSON) command to open the settings.json file. For workspace settings, open the settings.json file in the .vscode folder in your workspace.

workspace settings

Note

Workspace settings override user settings and are useful for sharing project-specific settings across a team.

Zen Mode

Zen mode lets you focus on your code by hiding all UI elements, except for the editor, switching VS Code to full screen, and centering the editor. Zen mode can be toggled with the View > Appearance > Zen Mode menu, View: Toggle Zen Mode in the Command Palette, or with the shortcut ?K Z (Windows, Linux Ctrl+K Z). Double press Esc to exit Zen mode. The transition to full screen can be disabled via zenMode.fullScreen.

Zen Mode can be further tuned with the following settings:

Reduce Notifications with Do Not Disturb Mode

If you are overwhelmed by notifications popping up, there is a way to reduce notifications, either for all notifications, or for notifications from a specific extension.

Select the bell icon in the Status Bar to open the Notifications area. This is a place where you can access all notifications at any time, even if you have enabled Do Not Disturb Mode.

Notifications center

Find the crossed out bell icon to get access to a menu where you can selectively disable notifications from extensions or enable the global Do Not Disturb Mode to disable all notifications.

Notifications do not disturb menu

Note

The global Do Not Disturb Mode also hides error notifications, while the extension-specific filter still allows error notifications to show.

Centered editor layout

Centered editor layout allows you to center align the editor area. This is useful when working with a single editor on a large monitor. You can use the side borders to resize the view (hold down the Alt key to independently move the sides).

Tabs

VS Code shows open items with tabs (tabbed headings) in the title area above the editor. When you open a file, a new tab is added for that file. Tabs let you quickly navigate between items.

tabs hero

You can drag and drop tabs to reorder them. To perform an action on multiple tabs at once, hold down the Ctrl key (Cmd on macOS) and select the tabs you want to act on. To select a range of tabs, hold down the Shift key and select the first and last tabs in the range.

When you have more open items than can fit in the title area, you can use the Open Editors section in the Explorer view (available through the ... button) to display a dropdown list of tabbed items.

There is also a scroll bar between the tab and editor regions to drag editors into view. You can increase the height of the scroll bar to make it easier to drag by setting Workbench > Editor: Title Scrollbar Sizing (workbench.editor.titleScrollbarSizing) to large.

If you don't want to use tabs, you can disable the feature by setting the workbench.editor.showTabs setting to single:

    "workbench.editor.showTabs": "single"

See the section below to optimize VS Code for working without Tabs.

Tip

Double-click in the editor title area to quickly create a new tab.

Tab ordering

By default, new tabs are added to the right of the existing tabs. You can control where you want new tabs to appear with the workbench.editor.openPositioning setting.

For example, you might like new tabbed items to appear on the left:

    "workbench.editor.openPositioning": "left"

You can reorder tabs by dragging and dropping them.

If you'd like an editor tab to always be visible, you can pin it to the editor tab bar. Learn more about pinning tabs in the Custom Layout article.

Preview mode

When you single-click or select a file in the Explorer view, it is shown in a preview mode and reuses an existing tab (preview tab). This is useful if you are quickly browsing files and don't want every visited file to have its own tab. When you start editing the file or use double-click to open the file from the Explorer, a new tab is dedicated to that file.

Preview mode is indicated by italics in the tab heading:

preview mode

If you prefer not to use preview mode and always create a new tab, you can control the behavior with these settings:

Wrapped tabs

To see more editor tabs, you can use the wrapped tab layout, where editor tabs wrap to fill multiple rows above the editor region. Enable wrapped tabs with the Workbench > Editor: Wrap Tabs (workbench.editor.wrapTabs) setting.

Wrapped editor tabs filling two rows about the editor region

Customize tab labels

When you have multiple files with the same name open at the same time, it can be difficult to distinguish the different tabs. To help with this, you can apply a custom display label to the tabs. You can choose for which files in your workspace you want to apply a custom label to the tab.

To enable custom display labels for tabs, set the workbench.editor.customLabels.enabled setting:

    "workbench.editor.customLabels.enabled": true

You can specify one or more naming patterns for the tab display labels with the workbench.editor.customLabels.patterns setting. A name pattern consists of two components:

  • Item - a glob pattern that matches file paths for which to apply a custom label. For example, **/static/**/*.html.
  • Value - a template for the custom label. Templates can use variables such as ${filename}, ${extname}, ${extname(N)}, ${dirname}, and ${dirname(N)}, which are dynamically replaced with values from the file's path.

The following sample displays the /src/orders/index.html file with a tab label of orders/index.

    "workbench.editor.customLabels.patterns": {
        "**/src/**/index.html": "${dirname}/${filename}"
    }

Screenshot of Setting editor to enable and specify custom labels for tabs

The following examples use the ${extname} variable for the file tests/editor.test.ts:

  • ${filename} => editor
  • ${extname} => test.ts
  • ${extname(0)} => ts
  • ${extname(1)} => test
  • ${extname(-1)} => test
  • ${extname(-2)} => ts
Note

The custom tab labels also apply in the Open Editors view and in Quick Open (?P (Windows, Linux Ctrl+P)).

Grid editor layout

By default, editor groups are laid out in vertical columns. For example, when you split an editor, it opens the editor to the side. You can arrange editor groups in any layout you like, both vertically and horizontally:

To support flexible layouts, you can create empty editor groups. By default, closing the last editor of an editor group also closes the group itself, but you can change this behavior with the new setting workbench.editor.closeEmptyGroups: false:

Grid Empty

There are a predefined set of editor layouts in the View > Editor Layout menu:

Grid Editor Layout Menu

By default, editors that open to the side (for example, by selecting the editor toolbar Split Editor action) open to the right-hand side of the active editor. If you prefer to open editors below the active one, set workbench.editor.openSideBySideDirection to down.

There are many keyboard commands for adjusting the editor layout by using the keyboard. If you prefer to use the mouse, you can use drag and drop to split the editor into any direction:

Tip

If you press and hold the Alt key while hovering over the toolbar action to split an editor, it offers to split to the other orientation. This is a fast way to split either to the right or to the bottom.

Grid Alt Click

Keyboard shortcuts

Here are some handy keyboard shortcuts to quickly navigate between editors and editor groups.

  • ??→ (Windows, Linux Ctrl+PageDown) - go to the right editor.
  • ??← (Windows, Linux Ctrl+PageUp) - go to the left editor.
  • ?Tab (Windows, Linux Ctrl+Tab) - open the previous editor in the editor group's most recently used list.
  • ?1 (Windows, Linux Ctrl+1) - go to the leftmost editor group.
  • ?2 (Windows, Linux Ctrl+2) - go to the center editor group.
  • ?3 (Windows, Linux Ctrl+3) - go to the rightmost editor group.
  • ?W (Windows Ctrl+F4, Linux Ctrl+W) - close the active editor.
  • ?K W (Windows, Linux Ctrl+K W) - close all editors in the editor group.
  • ?K ?W (Windows, Linux Ctrl+K Ctrl+W) - close all editors.

If you want to modify the default keyboard shortcuts, see Key Bindings for details.

Working without tabs

If you prefer not to use tabs (tabbed headings), you can disable tabs entirely by setting workbench.editor.showTabs to single or none.

Disable Preview mode

Without tabs, the Open Editors section of the Explorer view is a quick way to do file navigation. However, with preview editor mode enabled, files are not added to the Open Editors section. You can disable this feature through the workbench.editor.enablePreview and workbench.editor.enablePreviewFromQuickOpen settings.

Use keyboard shortcuts to navigate the editor history

You can change vs for Ctrl+Tab to show you a list of all opened editors from the history, independent of the active editor group.

Edit your keyboard shortcuts and add the following:

{ "key": "ctrl+tab", "command": "workbench.action.openPreviousEditorFromHistory" },
{ "key": "ctrl+tab", "command": "workbench.action.quickOpenNavigateNext", "when": "inQuickOpen" },

Close an entire group instead of a single editor

If you liked the behavior of VS Code closing an entire group when closing one editor, you can bind the following in your keybindings.

macOS:

{ "key": "cmd+w", "command": "workbench.action.closeEditorsInGroup" }

Windows/Linux:

{ "key": "ctrl+w", "command": "workbench.action.closeEditorsInGroup" }

Window management

VS Code has various options to control how VS Code windows (instances) should be opened or restored between sessions.

The settings window.openFoldersInNewWindow and window.openFilesInNewWindow are provided to configure opening new windows or reusing the last active window for files or folders and possible values are default, on and off.

If configured to be default, VS Code decides about reusing or opening a new window, based on the context from where the open request was made. Flip this to on or off to always behave the same. For example, if you feel that picking a file or folder from the File menu should always open in a new window, set this to on.

Note

There are cases where this setting is ignored, such as when you use the -new-window or -reuse-window command-line option.

The window.restoreWindows setting informs VS Code about how to restore the opened windows of your previous session. By default, VS Code restores all windows you worked on during your previous session (setting: all). Change this setting to none to never reopen any windows and always start with an empty VS Code instance. Change it to one to reopen the last opened window you worked on, or to folders to only restore windows that had folders opened.

Next steps

Now that you know the overall layout of VS Code, start to customize the editor to how you like to work by looking at the following articles:

Common questions

How can I change the color of the indent guides?

The indent guide colors are customizable, as are most VS Code user interface elements. To customize the indent guides color for your active Color Theme, use the workbench.colorCustomizations setting and modify the editorIndentGuide.background value.

For example, to make the indent guides bright blue, add the following to your settings.json:

"workbench.colorCustomizations": {
    "editorIndentGuide.background": "#0000ff"
}

Can I hide the Open Editors section in the Explorer view?

Yes, you can show or hide the Open Editors section by using the Views menu in the Explorer and toggling the Open Editors menu item.

Explorer menu to enable or disable views in the Explorer

红豆薏仁水有什么功效 梦见饺子是什么意思 落日余晖什么意思 tmp是什么药 月经每个月都提前是什么原因
孕妇生气对胎儿有什么影响 棺材用什么木材做最好 减肥期间早餐应该吃什么 小的五行属什么 眼睛充血用什么眼药水最好
虾仁炒什么菜好吃 为什么怀孕这么难 吃地瓜叶有什么好处和坏处 老气横秋是什么意思 尿隐血阳性是什么意思
老人家头晕是什么原因 小儿疳积是什么症状 木薯粉是什么东西 鸡配什么生肖最好 牙齿发黄是什么原因导致的
脚怕冷是什么原因引起的hcv7jop5ns3r.cn 雾霾蓝配什么颜色好看hcv9jop5ns7r.cn 姓蓝的是什么民族hcv8jop1ns2r.cn 一阴一阳是什么数字hcv8jop7ns8r.cn 镶嵌什么意思hcv9jop2ns1r.cn
扶正固本是什么意思hcv8jop4ns3r.cn 桃子和什么相克hcv7jop9ns0r.cn 吃什么提高免疫力和增强体质hcv7jop5ns6r.cn 美容美体是干什么的hcv8jop1ns1r.cn 始祖鸟什么档次hcv8jop6ns7r.cn
小节是什么意思hcv9jop4ns7r.cn 月亮什么时候是圆的hcv8jop7ns5r.cn 火龙果有什么好处bfb118.com 1944年属什么hcv8jop3ns1r.cn 7月4是什么星座inbungee.com
大腿内侧发黑是什么原因hcv7jop9ns4r.cn 梦见自己生了个女孩是什么意思hcv8jop0ns8r.cn nhl医学上是什么意思chuanglingweilai.com 女人是什么bfb118.com 激光脱毛对身体有什么危害hcv9jop5ns1r.cn
百度