Auto Pin
A Visual Studio Code extension that auto-pins editor tabs whose label matches a registered name or /regex/ pattern. Pin once, and the same editor will be pinned automatically every time it opens — even in a fresh window.
Features
- Per-name registration — pin once from the tab context menu; every future tab with that label is pinned on open.
- Regex patterns — register entries like
/^.+\.test\.ts$/i or /Git.*/ to match by pattern.
- Settings-driven — the list lives in
autoPin.names (application scope) and roams via Settings Sync.
- Works with any tab type — text editors, webviews (Git Graph, Markdown Preview, etc.), notebooks.
- Localized — English and 한국어 (UI follows the VS Code display language).
Usage
- Open a tab you want to keep pinned forever (e.g.
Git Graph, package.json).
- Right-click the tab title → Auto Pin (under the Pin / Keep Open group).
- The tab is registered and pinned. Any future tab with the same label will auto-pin on open.
- To remove: right-click → Auto Pin ✓. The entry is unregistered and the current tab is unpinned.
Settings
Open Settings → Auto Pin → Names, or edit settings.json directly:
{
"autoPin.names": [
"package.json",
"Git Graph",
"/^.+\\.test\\.ts$/i",
"/^Untitled-\\d+$/"
]
}
- Plain string — exact label match.
/pattern/flags — interpreted as a JavaScript RegExp tested against the tab label.
- Invalid regex literals silently fall back to exact-string matching.
Commands
| Command Palette title |
Action |
Auto Pin: Regist Current Actived Editor |
Register the active tab and pin it. |
Auto Pin: Unregist Current Actived Editor |
Unregister the active tab and unpin it. |
Auto Pin: Show Registered Names |
Quick-pick the registered list; select to remove. |
Auto Pin: Clear All Registrations |
Remove every entry (with confirmation). |
How It Works
Auto Pin listens to vscode.window.tabGroups.onDidChangeTabs. When a tab opens or becomes active, it compares the tab's label against the registered list — calling the built-in workbench.action.pinEditor when there's a match. Matching keys are derived from the tab's display label so webview-backed tabs (Git Graph, etc.) are supported.
Install (local VSIX)
code --install-extension auto-pin-1.0.0.vsix
Localization
| Locale |
Manifest |
Runtime strings |
| en |
package.nls.json |
source strings (no bundle file) |
| ko |
package.nls.ko.json |
l10n/bundle.l10n.ko.json |
Add a new locale by dropping package.nls.<locale>.json and l10n/bundle.l10n.<locale>.json. No source changes required.
Development
npm install
npm run compile # one-shot
npm run watch # incremental
npx @vscode/vsce package --allow-missing-repository --no-yarn
한국어 요약
등록한 탭 라벨이 다시 열릴 때 자동으로 pin 해 주는 VS Code 확장입니다.
- 탭 우클릭 → Auto Pin 으로 등록 (
Pin / Keep Open 그룹 아래에 표시됩니다).
- 등록 목록은 Settings의
autoPin.names 에서 직접 편집할 수 있고 /pattern/flags 형태의 정규식도 지원합니다.
- VS Code 표시 언어가
한국어면 메뉴·Settings·알림이 모두 한글로 표시됩니다.