Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Open vault in VS Code

nomarcubnomarcub45k downloads

Ribbon button and command to open vault as a Visual Studio Code (VSCode) workspace.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates17

This plugin for Obsidian makes a ribbon button, a file explorer context menu and two commands to open your vault as a Visual Studio Code workspace:

  • open-vscode: Uses child_process to launch VS Code with the code command. Currently, this is the command bound to the ribbon button.
  • open-vscode-via-url: Open VS Code using a vscode:// URL

It's functionality is probably made redundant now using the Shell commands and Customizable Sidebar (or Buttons) plugins, but it'll be maintained for the foreseeable future.

You can use VS Code for various purposes with your vault, such as for git version control, markdown formatting with Prettier, linting with markdownlint, mass formatting files and more.

video showcase

Context menu in file navigation.
context menu

The context menu entry also appears in Notebook Navigator, on both files and folders, when that plugin is installed (see implementation details).

The icons work with light and dark mode.

light and dark

You can also use it as a command and assign hotkeys to it. You can disable the ribbon button in settings. command

Prerequisites

For the default method of opening VS Code, you need to be able to launch VS Code from the command line.

  • Either the code command needs to be on your path. Most VS Code installers handle this.
    • Special steps needed for macOS: Visual Studio Code on macOS > Launch from the command line
  • Or the full path to the VS Code executable is required.
    • This is generally /usr/local/bin/code.
    • If you installed VS Code via Homebrew it will be /opt/homebrew/bin.
  • Some package managers, like Flatpak limit what Obsidian can do. You'll have to make sure Obsidian can access VS Code and has the capability to spawn a child process.
  • See other workarounds and discussion

For the alternative open-vscode-via-url method, your system needs to have already registered VS Code for the vscode:// URI scheme. This is done automatically for normal installs by VS Code.

Settings

  • Display Ribbon Icon
  • Ribbon opens via code (can alteratively open via URL method)

Template for executing the code command

You can template the command opening VS Code however you like with its provided command line arguments. This way you can technically launch any command you set, so take caution. Potential use cases include opening workspaces with .code-workspace files (e.g. for Dendron), opening specific files, folders, etc.

You can use the following variables: {{vaultpath}} (absolute), {{filepath}} (relative), {{folderpath}} (relative), {{line}} and {{ch}}. The default template is code "{{vaultpath}}" "{{vaultpath}}/{{filepath}}", which opens the current file (if there is one) in the workspace that is the vault's root folder. This gets expanded to be executed in your shell as code "C:\Users\YourUser\Documents\vault" "C:\Users\YourUser\Documents\vault/Note.md", for example.

If you want to jump to the line (and character), you can use code -g "{{vaultpath}}" "{{vaultpath}}/{{filepath}}:{{line}}:{{ch}}.
See also: VS Code CLI - Opening Files and Folders.

Settings for open-vscode-via-url

On some systems, this may be faster than using the child_process approach.
See: Opening VS Code with URLs.
The first time you use the URL method for opening, VS Code displays a confirmation dialog (that you just can hit enter on) for security reasons.

  • Open current file

    Open the current file rather than the root of the Obsidian vault.

  • Path to VS Code Workspace

    Defaults to the {{vaultpath}} template variable. You can set this to an absolute path to a ".code-workspace" file if you prefer to use a multi-root workspace.

  • URL protocol

    You can override the default vscode:// to VS Code Insiders, VSCodium or other VS Code variants' protocol string.

Installation

Install through the official Obsidian Community site: Obsidian Plugins - Open vault in VS Code.

You can also install the plugin via the Community Plugins tab within the Obsidian app.

You can also install the plugin manually by copying a release to your .obsidian/plugins/open-vscode folder.

This plugin on other sites

Obsidian Stats page
Obsidian Hub page

Development

This plugin follows the structure of the Obsidian Sample Plugin, see further details there.
Contributions are welcome.

If pjeby/hot-reload is installed, activated, and open-vscode is registered with hot-reload, then extra logging and DX commands to refresh settings are activated.

Credits

Original plugin by NomarCub.
If you like this plugin you can sponsor me here on GitHub: , on Ko-fi here: , or on PayPal here: .

  • Toggle ribbon setting by Ozan Tellioglu.
  • UseURL: open file in workspace feature and restructure by Tim Osborn.
  • Go to line support by Moy.
  • File explorer context menu by Quinn McHugh.
  • Notebook Navigator integration by sbstnslg.

Thank you to the makers of the DEVONlink plugin, as it was a great starting point for working with ribbon icons in Obsidian.

HealthExcellent
ReviewSatisfactory
About
Open your vault in Visual Studio Code from a ribbon button, file-explorer context menu, or commands. Launch via the code CLI or vscode:// URL, assign hotkeys, and use VS Code for git, formatting, linting and other workspace workflows.
IntegrationsWorkspacesCommands
Details
Current version
1.5.0
Last updated
3 weeks ago
Created
5 years ago
Updates
17 releases
Downloads
45k
Compatible with
Obsidian 1.12.3+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Sponsor
Ko-fi
Author
nomarcubnomarcub
github.com/NomarCub
GitHubnomarcub
  1. Community
  2. Plugins
  3. Integrations
  4. Open vault in VS Code

Related plugins

Actions URI

Add additional `x-callback-url` endpoints to the app for common actions — it's a clean, super-charged addition to Obsidian URI.

Shell commands

Define system commands that you want to execute via command palette, hotkeys, URI links or automated events. E.g. open external applications or perform automated file modifications.

BRAT

Easily install a beta version of a plugin for testing.

Homepage

Open a note, base, or workspace on startup, or set it for quick access later.

Local REST API with MCP

Unlock your automation needs by interacting with your notes over a secure REST API.

Quick Switcher++

Enhanced Quick Switcher, search open panels, and symbols.

Fast Note Sync

Real-time sync of your vaults across server, mobile, and web; shareable with anyone; supports REST and MCP integrations to build your personal AI knowledge base.

Vertical Tabs

Offer an alternative view that displays open tabs vertically, allowing users to group and organize tabs for a better navigation experience.

Maps

Adds a map layout to bases so you can display notes as an interactive map view.

Commander

Customize your workspace by adding commands everywhere, create macros and supercharge your mobile toolbar.