Hide and Seek Editor
Hide and Seek Editor is a VS Code extension that lets you temporarily hide an editor group and instantly restore it when you need it, preserving cursor and scroll position.
Useful when you want more screen space while working with split editors.
Key Features
Hide & Restore
- Toggle Editor Visibility: Hide/show the target editor group with a single command
- Non-Destructive: Files are only closed, never modified — cursor position, scroll position, and tab order are restored exactly
- Peek at a Hidden File: Open one hidden file without restoring the rest (
Hide & Seek: Peek Hidden File...)
- Safe by Default: Files with unsaved changes, and untitled files, are never hidden
Status Bar
- Shows current state at a glance (e.g.
Hide right / Show right)
- Position is configurable (
left / right / hidden)
- Button color while hidden is configurable (
red / yellow)
- A button in the editor title bar switches between a "hide" and "show" icon depending on the current state
Installation
Visual Studio Code Marketplace
https://github.com/uta1214/hide-and-seek-editor
Manual Installation
- Clone or download this repository
- Run
npm install to install dependencies
- Run
npm run compile to compile
- Run
vsce package to create a .vsix file
- In VS Code, select "Extensions" → "..." → "Install from VSIX"
Usage
Basic Usage
- Open multiple editors, or split the editor view
- Run Hide & Seek: Toggle from the Command Palette, or use the keyboard shortcut
- The target editor group is hidden, giving you more space
- Run it again to restore it with the exact cursor and scroll positions
Keybindings
Default keybindings:
| Feature | Key |
|---|---|
| Toggle Hide/Show | Ctrl+Alt+H (macOS: Cmd+Alt+H) |
| Peek at a Hidden File | Ctrl+Alt+P (macOS: Cmd+Alt+P) |
Peek at a Hidden File only works while an editor group is hidden.
You can customize these shortcuts in VS Code via Preferences → Keyboard Shortcuts.
How to Peek at a Hidden File
- While an editor group is hidden, press
Ctrl+Alt+P (or run Hide & Seek: Peek Hidden File... from the Command Palette)
- Select a file from the list
- It opens on its own, without restoring the rest of the hidden files
You can also use the status bar button, or the button in the editor title bar, to toggle hide/show.
Configuration
Main Settings
Display Settings
hideAndSeekEditor.statusBarPosition: Status bar button position
- Choose from
left, right, hidden
- Default:
right
hideAndSeekEditor.statusBarText: Text shown in the status bar button
auto: icon + the hideDirection value; anything else: icon + custom text (empty string = icon only)
- Default:
auto
hideAndSeekEditor.statusBarActiveColor: Status bar button color while an editor group is hidden
- Choose from
red, yellow
- Default:
yellow
Hide Behavior
hideAndSeekEditor.hideDirection: Which editor group to hide
- Choose from
right, left
- Default:
right
hideAndSeekEditor.autoFocusRemaining: Automatically focus the remaining editor group when hiding
- Default:
true
- (Renamed from
autoFocusLeft — the old name is still supported for backward compatibility but is deprecated)
Notifications & Persistence
hideAndSeekEditor.showNotifications: Show notifications on hide/restore/peek actions
hideAndSeekEditor.rememberAcrossSessions: Remember the hidden state across VS Code restarts
Known Limitations
- Only regular file tabs are hidden. Non-file tabs (Settings, Extensions, Keybindings, webviews, etc.) are intentionally left untouched. If a hidden-side editor group contains a mix of file tabs and non-file tabs, only the file tabs are closed — the group itself will stay visible, showing whatever non-file tab remains. This is a limitation of VS Code's extension API: non-file tabs generally don't expose enough information to reliably reopen them in the same state.
- Unsaved changes and untitled files are never touched. Tabs with unsaved changes, and new untitled files, are always excluded from hiding so nothing is closed without a way back.
License
This project is licensed under the MIT License. (See LICENSE file)
Free to use, modify, and redistribute.
Author
uta-orange-1214
Repository
https://github.com/uta1214/hide-and-seek-editor
日本語版 (Japanese)
Hide and Seek Editor
Hide and Seek Editor は、エディタグループを一時的に隠して、必要なときに即座に元へ戻せる VS Code 拡張機能です。カーソル位置とスクロール位置もそのまま復元されます。
分割エディタで作業していて画面を広く使いたいときに便利です。
主な機能
隠す・復元
- ワンコマンドで切り替え: 対象のエディタグループをワンコマンドで表示・非表示
- 非破壊的: ファイルを閉じるだけで内容には触れません。カーソル位置・スクロール位置・タブの並び順も正確に復元されます
- 隠したファイルを覗き見る: 全体を復元せず、隠したファイルを1つだけ開く(
Hide & Seek: Peek Hidden File...)
- デフォルトで安全: 未保存の変更があるファイルや、名前を付けていない新規ファイルは隠しません
ステータスバー
- 現在の状態がひと目で分かる(例:
Hide right / Show right)
- 表示位置を設定可能(
left / right / hidden)
- 隠している間のボタンの色を設定可能(
red / yellow)
エディタ上部のボタン
- エディタタイトルバーのボタンが、状態に応じて「隠す」用と「表示」用のアイコンに自動で切り替わる
インストール方法
Visual Studio Code Marketplace
https://github.com/uta1214/hide-and-seek-editor
手動インストール
- このリポジトリをクローンまたはダウンロード
npm install で依存関係をインストール
npm run compile でコンパイル
vsce package で .vsix ファイルを作成
- VS Code で「拡張機能」→「…」→「VSIX からインストール」を選択
使い方
基本的な使い方
- 複数のエディタを開くか、エディタを分割する
- コマンドパレットから Hide & Seek: Toggle を実行、またはキーボードショートカットを使用
- 対象のエディタグループが隠れて、作業スペースが広がる
- もう一度実行すると、カーソル位置とスクロール位置を保持したまま元に戻る
キーバインド
既定のキーバインド:
| 機能 | キー |
|------|------|
| 表示・非表示の切り替え | Ctrl+Alt+H(macOS: Cmd+Alt+H) |
| 隠したファイルを覗き見る | Ctrl+Alt+P(macOS: Cmd+Alt+P) |
「隠したファイルを覗き見る」は、エディタグループを隠している間のみ有効です。
VS Code の 設定 → キーボードショートカット から自由に変更できます。
隠したファイルの覗き見方
- エディタグループを隠している状態で
Ctrl+Alt+P を押す(またはコマンドパレットから Hide & Seek: Peek Hidden File... を実行)
- 一覧からファイルを選択
- 他の隠したファイルを復元せず、そのファイルだけが開く
ステータスバーのボタン、またはエディタ上部のボタンからも表示・非表示を切り替えられます。
設定
主な設定項目
表示設定
hideAndSeekEditor.statusBarPosition: ステータスバーのボタン位置
left, right, hidden から選択
- デフォルト:
right
hideAndSeekEditor.statusBarText: ステータスバーに表示するテキスト
auto: アイコン + hideDirection の値、それ以外: アイコン + カスタムテキスト(空文字 = アイコンのみ)
- デフォルト:
auto
hideAndSeekEditor.statusBarActiveColor: 隠している間のボタンの色
red, yellow から選択
- デフォルト:
yellow
隠す動作
hideAndSeekEditor.hideDirection: 隠す対象のエディタグループ
right, left から選択
- デフォルト:
right
hideAndSeekEditor.autoFocusRemaining: 隠す時に残ったエディタグループへ自動でフォーカス
- デフォルト:
true
- (
autoFocusLeft からの名称変更。旧名も後方互換のため使用可能ですが非推奨です)
通知・永続化
hideAndSeekEditor.showNotifications: 隠す・復元・覗き見の操作時に通知を表示
hideAndSeekEditor.rememberAcrossSessions: VS Code 再起動後も隠した状態を保持
既知の制限事項
- 隠せるのは通常のファイルタブのみです。 設定画面・拡張機能ビュー・キーバインド編集画面などのファイル以外のタブは、意図的に対象外としています。隠す側のエディタグループにファイルタブとファイル以外のタブが混在している場合、ファイルタブだけが閉じられ、ファイル以外のタブは残ったままになるため、そのグループ自体は表示されたままになります。これはVS Codeの拡張機能APIの制限によるもので、ファイル以外のタブは一般的に「同じ状態で開き直す」ために必要な情報を十分に持っていません。
- 未保存の変更がある場合や、名前を付けていない新規ファイルは対象外です。 元に戻せなくなるタブは、隠す対象から常に除外されます。
ライセンス
このプロジェクトのライセンスは MIT です。(LICENSE ファイル参照)
自由に利用・改変・再配布が可能です。
作者
uta-orange-1214
リポジトリ
https://github.com/uta1214/hide-and-seek-editor