You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2b08407
Browse filesBrowse the repository at this point in the historyBrowse files
<imgsrc="docs/assets/open-in-code-hero.png"width="100%"alt="Open in Code takes a selected Finder item and opens its folder in Visual Studio Code">
26
+
</p>
27
+
28
+
Open in Code is a small, native macOS utility built for the Finder toolbar. It gets you from the file you are looking at to the matching VS Code workspace without opening a terminal or navigating to the folder again.
29
+
30
+
|**One click**|**Finder-aware**|**Stable or Insiders**|
31
+
| --- | --- | --- |
32
+
| Lives in the Finder toolbar, ready whenever you need it. | Uses your selection when available and the current Finder window when it is not. | Prefers Visual Studio Code and falls back to Visual Studio Code Insiders. |
4
33
5
34
## Requirements
6
35
@@ -9,41 +38,54 @@ Open the folder you are viewing in Finder—or the folder containing a selected
9
38
10
39
## Install
11
40
12
-
Install the latest release with Homebrew:
41
+
### Homebrew
13
42
14
43
```sh
15
44
brew install --cask sozercan/repo/open-in-code
16
45
```
17
46
18
-
You can also download the app from [GitHub Releases](https://github.com/sozercan/OpenInCode/releases). If you download it directly, move **Open in Code.app** to `/Applications`.
47
+
### Direct download
19
48
20
-
## Add Open in Code to Finder
49
+
Download the app from [GitHub Releases](https://github.com/sozercan/OpenInCode/releases), then move **Open in Code.app** to `/Applications`.
50
+
51
+
## Add it to Finder
21
52
22
53
1. Open `/Applications` in Finder.
23
-
2. Hold Command and drag **Open in Code** to the Finder toolbar.
24
-
3. Release it where you want the toolbar button to appear.
54
+
2. Hold <kbd>⌘ Command</kbd> and drag **Open in Code** to the Finder toolbar.
55
+
3. Drop it wherever you want the button to live.
56
+
57
+
Hold <kbd>⌘ Command</kbd> while dragging the button again to reposition or remove it.
58
+
59
+
## How it works
25
60
26
-
To remove or reposition the button later, hold Command while dragging it.
61
+
Open a Finder window, optionally select an item, and click **Open in Code**.
27
62
28
-
## Use
63
+
| Finder state | What opens in VS Code |
64
+
| --- | --- |
65
+
| A folder is selected | The selected folder |
66
+
| A file or Finder package is selected | Its containing folder |
67
+
| Multiple items are selected | The first selected item's folder |
68
+
| Nothing is selected | The folder shown in the front Finder window |
29
69
30
-
Open a Finder window, optionally select an item, and click **Open in Code** in the toolbar.
70
+
## Finder permission
31
71
32
-
- A selected folder opens directly.
33
-
- A selected file or Finder package opens its containing folder.
34
-
- If multiple items are selected, the first item is used.
35
-
- If nothing is selected, the folder shown in the front Finder window opens.
36
-
- Visual Studio Code is preferred; Visual Studio Code Insiders is used when the stable app is not installed.
72
+
> [!NOTE]
73
+
> On first use, macOS asks whether **Open in Code** may control Finder. Allow access so the app can read the current Finder selection.
37
74
38
-
## Allow Finder access
75
+
<details>
76
+
<summary><strong>If Finder access was previously denied</strong></summary>
39
77
40
-
On first use, macOS asks whether **Open in Code** may control Finder. Allow access so the app can read the current Finder selection.
78
+
Enable **Open in Code → Finder** in the appropriate settings pane:
41
79
42
-
If access was previously denied, enable **Open in Code → Finder** here:
80
+
-**macOS 13 or newer:** System Settings → Privacy & Security → Automation
0 commit comments