Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Commit cb48d95

Browse files
authored
Merge pull request #7 from kbshl/feature/Allow_opening_a_specific_file_folder
Allow opening a specific file/folder not just projects
2 parents e8cc959 + 42803eb commit cb48d95

File tree

7 files changed

+213
-29
lines changed

7 files changed

+213
-29
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ npm-debug.log
3030
### Builds
3131
build.log
3232
build
33+
dist
97.8 KB
Loading

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## Version 1.2.0
2+
3+
* Added new keyword `vs` to open specified file or folder in Visual Studio Code. Press and hold `shift` to open file or folder in a new Visual Studio Code window.
4+
* Removed `dist` folder, cause releases are managed in Github.
5+
6+
```bash
7+
vs ~/my/shiny/folder/or/file
8+
```
9+
110
## Version 1.1.0
211

312
* Added VSCode Insiders Edition support

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Alfred Visual Studio Code Project Manager Workflow
22

3-
Simple workflow that allows you to browse and open [Visual Studio Code](https://code.visualstudio.com/) projects.
3+
Simple workflow that allows you to browse and open [Visual Studio Code](https://code.visualstudio.com/) projects or simply open specified folders/files.
44

55
* [Requirements](#requirements)
66
* [Installation](#installation)
@@ -9,7 +9,7 @@ Simple workflow that allows you to browse and open [Visual Studio Code](https://
99
## Requirements
1010

1111
* [NodeJS](https://nodejs.org)
12-
* [Visual Studio Code Project Manager](https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager)
12+
* [Visual Studio Code Project Manager](https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager) - Only if you like to have a project manager for VS Code.
1313
* [Visual Studio Code Command Line](https://code.visualstudio.com/docs/setup/mac)
1414
* [Alfred Powerpack](https://www.alfredapp.com/powerpack)
1515

@@ -21,10 +21,18 @@ Download the latest `VisualStudioCode.alfredworkflow` from [GitHub](https://gith
2121

2222
## Usage
2323

24+
### Projects
25+
2426
Simply type `vsc` followed by space to list all projects. Optionally type a search string to filter results.
2527

2628
![alfred-vs-code](documentation/screenshot.png)
2729

30+
### Folders / Files
31+
32+
Type `vs` followed by space and search for a specific folder or file to open in Visual Studio Code.
33+
34+
Press and hold `shift` to open that folder or file in a new VS Code window, before pressing return.
35+
2836
## Thanks!
2937

3038
Big Thanks to [Cloudstek](https://github.com/Cloudstek) for his [Alfred Atom Workflow](https://github.com/Cloudstek/alfred-atom) which I used as a base for this project.
-2.41 MB
Binary file not shown.

info.plist

Lines changed: 191 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,29 @@
88
<string>Productivity</string>
99
<key>connections</key>
1010
<dict>
11+
<key>48B1068B-C755-4DBE-BDAB-9F24B0EE3354</key>
12+
<array>
13+
<dict>
14+
<key>destinationuid</key>
15+
<string>7F96C0AC-981E-4579-AFF4-CB907D33CAC4</string>
16+
<key>modifiers</key>
17+
<integer>0</integer>
18+
<key>modifiersubtext</key>
19+
<string></string>
20+
<key>vitoclose</key>
21+
<false/>
22+
</dict>
23+
<dict>
24+
<key>destinationuid</key>
25+
<string>0344F04E-AC60-4847-AA73-E093D16BBB46</string>
26+
<key>modifiers</key>
27+
<integer>131072</integer>
28+
<key>modifiersubtext</key>
29+
<string>Open within VS Code as new window</string>
30+
<key>vitoclose</key>
31+
<false/>
32+
</dict>
33+
</array>
1134
<key>4DD30082-AABC-4CFA-8FC3-0738FA31C350</key>
1235
<array>
1336
<dict>
@@ -60,7 +83,7 @@
6083
<key>concurrently</key>
6184
<true/>
6285
<key>escaping</key>
63-
<integer>98</integer>
86+
<integer>0</integer>
6487
<key>script</key>
6588
<string>/usr/local/bin/${vscodeEdition} {query}</string>
6689
<key>scriptargtype</key>
@@ -77,29 +100,6 @@
77100
<key>version</key>
78101
<integer>2</integer>
79102
</dict>
80-
<dict>
81-
<key>config</key>
82-
<dict>
83-
<key>concurrently</key>
84-
<true/>
85-
<key>escaping</key>
86-
<integer>98</integer>
87-
<key>script</key>
88-
<string>open -a Finder {query}</string>
89-
<key>scriptargtype</key>
90-
<integer>0</integer>
91-
<key>scriptfile</key>
92-
<string></string>
93-
<key>type</key>
94-
<integer>0</integer>
95-
</dict>
96-
<key>type</key>
97-
<string>alfred.workflow.action.script</string>
98-
<key>uid</key>
99-
<string>76A26469-7BB5-46C5-ADFE-C95581EB9B95</string>
100-
<key>version</key>
101-
<integer>2</integer>
102-
</dict>
103103
<dict>
104104
<key>config</key>
105105
<dict>
@@ -147,6 +147,29 @@
147147
<key>version</key>
148148
<integer>2</integer>
149149
</dict>
150+
<dict>
151+
<key>config</key>
152+
<dict>
153+
<key>concurrently</key>
154+
<true/>
155+
<key>escaping</key>
156+
<integer>98</integer>
157+
<key>script</key>
158+
<string>open -a Finder {query}</string>
159+
<key>scriptargtype</key>
160+
<integer>0</integer>
161+
<key>scriptfile</key>
162+
<string></string>
163+
<key>type</key>
164+
<integer>0</integer>
165+
</dict>
166+
<key>type</key>
167+
<string>alfred.workflow.action.script</string>
168+
<key>uid</key>
169+
<string>76A26469-7BB5-46C5-ADFE-C95581EB9B95</string>
170+
<key>version</key>
171+
<integer>2</integer>
172+
</dict>
150173
<dict>
151174
<key>config</key>
152175
<dict>
@@ -170,6 +193,128 @@
170193
<key>version</key>
171194
<integer>2</integer>
172195
</dict>
196+
<dict>
197+
<key>config</key>
198+
<dict>
199+
<key>concurrently</key>
200+
<false/>
201+
<key>escaping</key>
202+
<integer>0</integer>
203+
<key>script</key>
204+
<string>/usr/local/bin/${vscodeEdition} "{query}"</string>
205+
<key>scriptargtype</key>
206+
<integer>0</integer>
207+
<key>scriptfile</key>
208+
<string></string>
209+
<key>type</key>
210+
<integer>0</integer>
211+
</dict>
212+
<key>type</key>
213+
<string>alfred.workflow.action.script</string>
214+
<key>uid</key>
215+
<string>7F96C0AC-981E-4579-AFF4-CB907D33CAC4</string>
216+
<key>version</key>
217+
<integer>2</integer>
218+
</dict>
219+
<dict>
220+
<key>config</key>
221+
<dict>
222+
<key>anchorfields</key>
223+
<true/>
224+
<key>argumenttrimmode</key>
225+
<integer>0</integer>
226+
<key>argumenttype</key>
227+
<integer>0</integer>
228+
<key>daterange</key>
229+
<integer>0</integer>
230+
<key>fields</key>
231+
<array>
232+
<dict>
233+
<key>field</key>
234+
<string>kMDItemDisplayName</string>
235+
<key>not</key>
236+
<false/>
237+
<key>split</key>
238+
<true/>
239+
<key>value</key>
240+
<string>{query}</string>
241+
<key>words</key>
242+
<true/>
243+
</dict>
244+
<dict>
245+
<key>field</key>
246+
<string>kMDItemAlternateNames</string>
247+
<key>not</key>
248+
<false/>
249+
<key>split</key>
250+
<true/>
251+
<key>value</key>
252+
<string>{query}</string>
253+
<key>words</key>
254+
<true/>
255+
</dict>
256+
<dict>
257+
<key>field</key>
258+
<string>kMDItemFinderComment</string>
259+
<key>not</key>
260+
<false/>
261+
<key>split</key>
262+
<true/>
263+
<key>value</key>
264+
<string>{query}</string>
265+
<key>words</key>
266+
<true/>
267+
</dict>
268+
</array>
269+
<key>includesystem</key>
270+
<false/>
271+
<key>keyword</key>
272+
<string>vs</string>
273+
<key>runningsubtext</key>
274+
<string></string>
275+
<key>scopes</key>
276+
<array>
277+
<string>~</string>
278+
</array>
279+
<key>subtext</key>
280+
<string>Open within Visual Studio Code</string>
281+
<key>title</key>
282+
<string>Visual Studio Code</string>
283+
<key>types</key>
284+
<array/>
285+
<key>withspace</key>
286+
<true/>
287+
</dict>
288+
<key>type</key>
289+
<string>alfred.workflow.input.filefilter</string>
290+
<key>uid</key>
291+
<string>48B1068B-C755-4DBE-BDAB-9F24B0EE3354</string>
292+
<key>version</key>
293+
<integer>1</integer>
294+
</dict>
295+
<dict>
296+
<key>config</key>
297+
<dict>
298+
<key>concurrently</key>
299+
<false/>
300+
<key>escaping</key>
301+
<integer>0</integer>
302+
<key>script</key>
303+
<string>/usr/local/bin/${vscodeEdition} --new-window "{query}"</string>
304+
<key>scriptargtype</key>
305+
<integer>0</integer>
306+
<key>scriptfile</key>
307+
<string></string>
308+
<key>type</key>
309+
<integer>0</integer>
310+
</dict>
311+
<key>type</key>
312+
<string>alfred.workflow.action.script</string>
313+
<key>uid</key>
314+
<string>0344F04E-AC60-4847-AA73-E093D16BBB46</string>
315+
<key>version</key>
316+
<integer>2</integer>
317+
</dict>
173318
</array>
174319
<key>readme</key>
175320
<string># Alfred Visual Studio Code Project Manager Workflow
@@ -204,13 +349,27 @@ Simply type `vsc` followed by space to list all projects. Optionally type a sear
204349
Big Thanks to [Cloudstek](https://github.com/Cloudstek) for his [Alfred Atom Workflow](https://github.com/Cloudstek/alfred-atom) which I used as a base for this project.</string>
205350
<key>uidata</key>
206351
<dict>
352+
<key>0344F04E-AC60-4847-AA73-E093D16BBB46</key>
353+
<dict>
354+
<key>xpos</key>
355+
<integer>520</integer>
356+
<key>ypos</key>
357+
<integer>550</integer>
358+
</dict>
207359
<key>16C325FD-9D57-4988-9A88-CE69B2EF34FA</key>
208360
<dict>
209361
<key>xpos</key>
210362
<integer>520</integer>
211363
<key>ypos</key>
212364
<integer>300</integer>
213365
</dict>
366+
<key>48B1068B-C755-4DBE-BDAB-9F24B0EE3354</key>
367+
<dict>
368+
<key>xpos</key>
369+
<integer>120</integer>
370+
<key>ypos</key>
371+
<integer>420</integer>
372+
</dict>
214373
<key>4DD30082-AABC-4CFA-8FC3-0738FA31C350</key>
215374
<dict>
216375
<key>xpos</key>
@@ -225,6 +384,13 @@ Big Thanks to [Cloudstek](https://github.com/Cloudstek) for his [Alfred Atom Wor
225384
<key>ypos</key>
226385
<integer>180</integer>
227386
</dict>
387+
<key>7F96C0AC-981E-4579-AFF4-CB907D33CAC4</key>
388+
<dict>
389+
<key>xpos</key>
390+
<integer>520</integer>
391+
<key>ypos</key>
392+
<integer>420</integer>
393+
</dict>
228394
<key>8A722A20-D801-4DAC-AA32-80052ADC87D4</key>
229395
<dict>
230396
<key>xpos</key>
@@ -247,7 +413,7 @@ Big Thanks to [Cloudstek](https://github.com/Cloudstek) for his [Alfred Atom Wor
247413
<string>terminalApp</string>
248414
</array>
249415
<key>version</key>
250-
<string>1.1.0</string>
416+
<string>1.2.0</string>
251417
<key>webaddress</key>
252418
<string>https://github.com/konstantinbueschel/alfred-vs-code</string>
253419
</dict>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "alfred-vs-code",
3-
"version": "1.0.0",
3+
"version": "1.2.0",
4+
"author": "Konstantin Büschel <konstantin.bueschel@gmail.com>",
45
"description": "Alfred workflow that allows you to browse and open Visual Studio Code projects",
56
"dependencies": {
67
"alfred-workflow-nodejs": "^2.0.1",
78
"fs-extra": "^4.0.1",
89
"fuzzaldrin": "^2.1.0"
910
},
10-
"author": "Konstantin Büschel <konstantin.bueschel@gmail.com>",
1111
"license": "MIT"
1212
}

0 commit comments

Comments
 (0)