├── .gitignore
├── LICENSE
├── Open in Visual Studio Code.workflow
└── Contents
│ ├── Info.plist
│ ├── QuickLook
│ └── Thumbnail.png
│ ├── _CodeSignature
│ ├── CodeDirectory
│ ├── CodeRequirements
│ ├── CodeRequirements-1
│ ├── CodeResources
│ └── CodeSignature
│ └── document.wflow
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | .DS_Store
3 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Runar Ovesen Hjerpbakk
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Open in Visual Studio Code.workflow/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSServices
6 |
7 |
8 | NSMenuItem
9 |
10 | default
11 | Open in Visual Studio Code
12 |
13 | NSMessage
14 | runWorkflowAsService
15 | NSSendFileTypes
16 |
17 | public.folder
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Open in Visual Studio Code.workflow/Contents/QuickLook/Thumbnail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjerpbakk/OpenFolderInVSCode/49d401e20cbc7bbbf1801b8b13f7d2c1b938fd35/Open in Visual Studio Code.workflow/Contents/QuickLook/Thumbnail.png
--------------------------------------------------------------------------------
/Open in Visual Studio Code.workflow/Contents/_CodeSignature/CodeDirectory:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjerpbakk/OpenFolderInVSCode/49d401e20cbc7bbbf1801b8b13f7d2c1b938fd35/Open in Visual Studio Code.workflow/Contents/_CodeSignature/CodeDirectory
--------------------------------------------------------------------------------
/Open in Visual Studio Code.workflow/Contents/_CodeSignature/CodeRequirements:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjerpbakk/OpenFolderInVSCode/49d401e20cbc7bbbf1801b8b13f7d2c1b938fd35/Open in Visual Studio Code.workflow/Contents/_CodeSignature/CodeRequirements
--------------------------------------------------------------------------------
/Open in Visual Studio Code.workflow/Contents/_CodeSignature/CodeRequirements-1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjerpbakk/OpenFolderInVSCode/49d401e20cbc7bbbf1801b8b13f7d2c1b938fd35/Open in Visual Studio Code.workflow/Contents/_CodeSignature/CodeRequirements-1
--------------------------------------------------------------------------------
/Open in Visual Studio Code.workflow/Contents/_CodeSignature/CodeResources:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | files
6 |
7 | files2
8 |
9 | QuickLook/Preview.png
10 |
11 | hash
12 |
13 | IFqM66U2eqWkWC3FuHfugwKh3Nk=
14 |
15 | hash2
16 |
17 | ++/e5JW4cJLaPcJGZc1jDL0uF2zYlMqeKFq76jcPiHw=
18 |
19 |
20 | document.wflow
21 |
22 | cdhash
23 |
24 | juAyWQLvv450Ge0bFrOPvD1Nfao=
25 |
26 | requirement
27 | identifier document and anchor apple generic and certificate leaf[subject.CN] = "Mac Developer: Runar Ovesen Hjerpbakk (7W2E44BX24)" and certificate 1[field.1.2.840.113635.100.6.2.1] /* exists */
28 |
29 |
30 | rules
31 |
32 | ^Resources/
33 |
34 | ^Resources/.*\.lproj/
35 |
36 | optional
37 |
38 | weight
39 | 1000
40 |
41 | ^Resources/.*\.lproj/locversion.plist$
42 |
43 | omit
44 |
45 | weight
46 | 1100
47 |
48 | ^Resources/Base\.lproj/
49 |
50 | weight
51 | 1010
52 |
53 | ^version.plist$
54 |
55 |
56 | rules2
57 |
58 | .*\.dSYM($|/)
59 |
60 | weight
61 | 11
62 |
63 | ^(.*/)?\.DS_Store$
64 |
65 | omit
66 |
67 | weight
68 | 2000
69 |
70 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
71 |
72 | nested
73 |
74 | weight
75 | 10
76 |
77 | ^.*
78 |
79 | ^Info\.plist$
80 |
81 | omit
82 |
83 | weight
84 | 20
85 |
86 | ^PkgInfo$
87 |
88 | omit
89 |
90 | weight
91 | 20
92 |
93 | ^Resources/
94 |
95 | weight
96 | 20
97 |
98 | ^Resources/.*\.lproj/
99 |
100 | optional
101 |
102 | weight
103 | 1000
104 |
105 | ^Resources/.*\.lproj/locversion.plist$
106 |
107 | omit
108 |
109 | weight
110 | 1100
111 |
112 | ^Resources/Base\.lproj/
113 |
114 | weight
115 | 1010
116 |
117 | ^[^/]+$
118 |
119 | nested
120 |
121 | weight
122 | 10
123 |
124 | ^embedded\.provisionprofile$
125 |
126 | weight
127 | 20
128 |
129 | ^version\.plist$
130 |
131 | weight
132 | 20
133 |
134 |
135 |
136 |
137 |
--------------------------------------------------------------------------------
/Open in Visual Studio Code.workflow/Contents/_CodeSignature/CodeSignature:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hjerpbakk/OpenFolderInVSCode/49d401e20cbc7bbbf1801b8b13f7d2c1b938fd35/Open in Visual Studio Code.workflow/Contents/_CodeSignature/CodeSignature
--------------------------------------------------------------------------------
/Open in Visual Studio Code.workflow/Contents/document.wflow:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | AMApplicationBuild
6 | 444.4
7 | AMApplicationVersion
8 | 2.8
9 | AMDocumentVersion
10 | 2
11 | actions
12 |
13 |
14 | action
15 |
16 | AMAccepts
17 |
18 | Container
19 | List
20 | Optional
21 |
22 | Types
23 |
24 | com.apple.cocoa.path
25 |
26 |
27 | AMActionVersion
28 | 2.1.1
29 | AMApplication
30 |
31 | Finder
32 |
33 | AMParameterProperties
34 |
35 | AMProvides
36 |
37 | Container
38 | List
39 | Types
40 |
41 | com.apple.cocoa.path
42 |
43 |
44 | AMRequiredResources
45 |
46 | ActionBundlePath
47 | /System/Library/Automator/Get Selected Finder Items 2.action
48 | ActionName
49 | Get Selected Finder Items
50 | ActionParameters
51 |
52 | BundleIdentifier
53 | com.apple.Automator.GetSelectedFinderItems2
54 | CFBundleVersion
55 | 2.1.1
56 | CanShowSelectedItemsWhenRun
57 |
58 | CanShowWhenRun
59 |
60 | Category
61 |
62 | AMCategoryFilesAndFolders
63 |
64 | Class Name
65 | AMGetSelectedFinderItemsAction
66 | Disabled
67 |
68 | InputUUID
69 | 57B2643A-740A-4D1C-813B-396DEC3318FE
70 | Keywords
71 |
72 | OutputUUID
73 | 14D591C4-3DF4-4A3B-A019-B9F0B1DB4258
74 | UUID
75 | 5F6EA53E-E3BC-4BA7-A144-98F3C5D284D2
76 | UnlocalizedApplications
77 |
78 | Finder
79 |
80 | arguments
81 |
82 |
83 |
84 |
85 | action
86 |
87 | AMAccepts
88 |
89 | Container
90 | List
91 | Optional
92 |
93 | Types
94 |
95 | com.apple.cocoa.string
96 |
97 |
98 | AMActionVersion
99 | 2.0.3
100 | AMApplication
101 |
102 | Automator
103 |
104 | AMParameterProperties
105 |
106 | COMMAND_STRING
107 |
108 | CheckedForUserDefaultShell
109 |
110 | inputMethod
111 |
112 | shell
113 |
114 | source
115 |
116 |
117 | AMProvides
118 |
119 | Container
120 | List
121 | Types
122 |
123 | com.apple.cocoa.string
124 |
125 |
126 | ActionBundlePath
127 | /System/Library/Automator/Run Shell Script.action
128 | ActionName
129 | Run Shell Script
130 | ActionParameters
131 |
132 | COMMAND_STRING
133 | export PATH=/usr/local/bin:$PATH
134 | for f in "$@"; do
135 | code "$f" -n
136 | done
137 | CheckedForUserDefaultShell
138 |
139 | inputMethod
140 | 1
141 | shell
142 | /bin/bash
143 | source
144 |
145 |
146 | BundleIdentifier
147 | com.apple.RunShellScript
148 | CFBundleVersion
149 | 2.0.3
150 | CanShowSelectedItemsWhenRun
151 |
152 | CanShowWhenRun
153 |
154 | Category
155 |
156 | AMCategoryUtilities
157 |
158 | Class Name
159 | RunShellScriptAction
160 | InputUUID
161 | E4EDD516-3BD3-4218-BBE4-F591512C3FC0
162 | Keywords
163 |
164 | Shell
165 | Script
166 | Command
167 | Run
168 | Unix
169 |
170 | OutputUUID
171 | B6A684AC-7733-45EE-97F3-BAC8A5173E98
172 | UUID
173 | D87B82B6-F400-4CFF-8B11-E07903530200
174 | UnlocalizedApplications
175 |
176 | Automator
177 |
178 | arguments
179 |
180 | 0
181 |
182 | default value
183 | 0
184 | name
185 | inputMethod
186 | required
187 | 0
188 | type
189 | 0
190 | uuid
191 | 0
192 |
193 | 1
194 |
195 | default value
196 |
197 | name
198 | source
199 | required
200 | 0
201 | type
202 | 0
203 | uuid
204 | 1
205 |
206 | 2
207 |
208 | default value
209 |
210 | name
211 | CheckedForUserDefaultShell
212 | required
213 | 0
214 | type
215 | 0
216 | uuid
217 | 2
218 |
219 | 3
220 |
221 | default value
222 |
223 | name
224 | COMMAND_STRING
225 | required
226 | 0
227 | type
228 | 0
229 | uuid
230 | 3
231 |
232 | 4
233 |
234 | default value
235 | /bin/sh
236 | name
237 | shell
238 | required
239 | 0
240 | type
241 | 0
242 | uuid
243 | 4
244 |
245 |
246 | isViewVisible
247 |
248 | location
249 | 309.000000:319.000000
250 | nibPath
251 | /System/Library/Automator/Run Shell Script.action/Contents/Resources/English.lproj/main.nib
252 |
253 | isViewVisible
254 |
255 |
256 |
257 | connectors
258 |
259 | 89275B02-8107-4CA5-BD01-B7E87594CC1C
260 |
261 | from
262 | 5F6EA53E-E3BC-4BA7-A144-98F3C5D284D2 - 5F6EA53E-E3BC-4BA7-A144-98F3C5D284D2
263 | to
264 | D87B82B6-F400-4CFF-8B11-E07903530200 - D87B82B6-F400-4CFF-8B11-E07903530200
265 |
266 |
267 | workflowMetaData
268 |
269 | serviceInputTypeIdentifier
270 | com.apple.Automator.fileSystemObject.folder
271 | serviceOutputTypeIdentifier
272 | com.apple.Automator.nothing
273 | serviceProcessesInput
274 | 0
275 | workflowTypeIdentifier
276 | com.apple.Automator.servicesMenu
277 |
278 |
279 |
280 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Open a Folder in Visual Studio Code
2 |
3 | ## Installing the macOS service
4 |
5 | When working on many simultaneous projects with Visual Studio Code (VS Code), it is convenient having a fast way of opening the project folders. With the *open from the terminal* shell extension, together this service, your project folders can be opened from both the Terminal and the Finder.
6 |
7 | 1. Install the `code` shell command in Terminal's path using VS Code following these [simple instructions](https://code.visualstudio.com/docs/setup/mac).
8 | 2. [Download](https://github.com/Sankra/OpenFolderInVSCode/releases/tag/v1.0) and extract this macOS service.
9 | 3. Open the service and choose *Install*.
10 |
11 | 
12 |
13 | That's it! Now all you have to do is right clicking on a folder and choose the *Open in Visual Studio Code* service and your folder will open as a project in VS Code.
14 |
15 | 
16 |
17 | [Original blog post](http://hjerpbakk.com/blog/2017/01/29/open-folder-in-vs-code)
18 |
19 | ## Changing the code
20 |
21 | If you want to edit your own version of this service, clone or download the repository and [follow these instructions](https://hjerpbakk.com/blog/2019/01/24/edit-an-automator-workflow).
22 |
--------------------------------------------------------------------------------