Click a .html / .htm file in Explorer and it opens in Cursor's embedded browser. The extension also adds two editor title-bar buttons and a Browser bookmarks side pane.
It calls Cursor workbench commands (workbench.action.newBrowserTab and workbench.action.openBrowserEditor). Stock VS Code does not register those commands, so this extension is for Cursor. Install it from the Visual Studio Marketplace.
Marketplace page: Browser Bar Button.
Requirements
- Cursor with the embedded browser
- A local folder when you want to open an
.html or .htm file (virtual workspaces have no file on disk)
Features
- Explorer click — opening a
.html / .htm file uses the embedded browser by default (not the text editor). Use Open With… → text editor for the source. A second click on the same file reuses that browser tab; if the browser cannot open, the file falls back to the text editor.
- New Browser Tab (
$(browser)) — always visible on the editor title bar; focuses or opens an empty embedded browser
- Open HTML in Browser (
$(globe)) — only when a .html / .htm file is active; opens that file in the browser
- Browser Activity Bar side pane — opens the embedded browser when the pane is shown, and lists bookmarks
- Save, open, and delete bookmarked URLs (persisted across sessions on this machine)
- Open Local File from Clipboard — paste an absolute path or
file:// URL from the clipboard
- Explorer / tab context menu: Open HTML in Browser for local HTML files
- Uses the same local file URI format as Explorer Open in Browser
- Lightweight — no settings required
Usage
Explorer (HTML files)
- Click a
.html or .htm file in the File Explorer.
- Cursor opens it in the embedded browser (reuses an existing tab for that URL when possible).
- To edit the source: right-click the file → Open With… → text editor (or the default code editor).
Editor title bar
- New Browser Tab (browser icon) — available on any editor; opens or focuses an empty embedded browser tab.
- Open HTML in Browser (globe) — appears only for
.html / .htm tabs; opens that file in the embedded browser.
Command Palette: New Browser Tab (editor.openEmbeddedBrowser) and Open HTML in Browser (editor.openHtmlInBrowser).
If either icon is hidden under ⋯ after Cursor 2.1+, use Configure Icon Visibility and enable the matching command.
Browser bookmarks side pane
- Click the Browser icon in the Activity Bar — the embedded browser opens when the side pane is shown.
- Click + in the side pane title to add a bookmark (URL + name).
- Click a bookmark to open it in the embedded browser.
- Click the trash icon on a bookmark to delete it.
- Click the clipboard icon to open a local file path copied to the clipboard.
Extension Settings
This extension does not add any configuration settings.
Bookmarks are stored in Cursor's local extension storage on this machine. The extension does not send them anywhere. The clipboard is read only when you click Open Local File from Clipboard.
Known Limitations
- Needs Cursor's embedded browser. It does not open VS Code's Simple Browser.
- Local
file:// preview depends on that embedded browser. Remote workspaces may behave differently.
- Cursor may hide title-bar icons by default (Configure Icon Visibility).
- In a restricted (untrusted) workspace the buttons still run only after you click them.
- Explorer click is the default for
.html / .htm. Other extensions that also claim those files as a default custom editor may compete for the open action.
Development
npm install
npm run compile
npm run package
Press F5 in this folder to launch an Extension Development Host.
Publish to the Marketplace
Publisher id: oleksiiko. The published identifier is oleksiiko.cursor-browser-bar-button.
- Create a Personal Access Token with the Marketplace (Manage) scope. Do not commit the token.
- From this folder, with the token in the environment:
export VSCE_PAT="..."
npm run publish
vsce publish reads VSCE_PAT. npx @vscode/vsce login oleksiiko stores the same token locally and is optional when VSCE_PAT is already set. Do not pass a new version on the command line. The version in package.json is the version that gets published.
License
MIT © Oleksii Konashevych