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

Commit

Permalink
Merge pull request #7 from kbshl/feature/Allow_opening_a_specific_fil…
Browse files Browse the repository at this point in the history
…e_folder

Allow opening a specific file/folder not just projects
  • Loading branch information
kbshl authored Apr 30, 2018
2 parents e8cc959 + 42803eb commit cb48d95
Show file tree
Hide file tree
Showing 7 changed files with 213 additions and 29 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ npm-debug.log
### Builds
build.log
build
dist
Binary file added 48B1068B-C755-4DBE-BDAB-9F24B0EE3354.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## Version 1.2.0

* 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.
* Removed `dist` folder, cause releases are managed in Github.

```bash
vs ~/my/shiny/folder/or/file
```

## Version 1.1.0

* Added VSCode Insiders Edition support
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Alfred Visual Studio Code Project Manager Workflow

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

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

* [NodeJS](https://nodejs.org)
* [Visual Studio Code Project Manager](https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager)
* [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.
* [Visual Studio Code Command Line](https://code.visualstudio.com/docs/setup/mac)
* [Alfred Powerpack](https://www.alfredapp.com/powerpack)

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

## Usage

### Projects

Simply type `vsc` followed by space to list all projects. Optionally type a search string to filter results.

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

### Folders / Files

Type `vs` followed by space and search for a specific folder or file to open in Visual Studio Code.

Press and hold `shift` to open that folder or file in a new VS Code window, before pressing return.

## Thanks!

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.
Binary file removed dist/VisualStudioCode.alfredworkflow
Binary file not shown.
216 changes: 191 additions & 25 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,29 @@
<string>Productivity</string>
<key>connections</key>
<dict>
<key>48B1068B-C755-4DBE-BDAB-9F24B0EE3354</key>
<array>
<dict>
<key>destinationuid</key>
<string>7F96C0AC-981E-4579-AFF4-CB907D33CAC4</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
<string></string>
<key>vitoclose</key>
<false/>
</dict>
<dict>
<key>destinationuid</key>
<string>0344F04E-AC60-4847-AA73-E093D16BBB46</string>
<key>modifiers</key>
<integer>131072</integer>
<key>modifiersubtext</key>
<string>Open within VS Code as new window</string>
<key>vitoclose</key>
<false/>
</dict>
</array>
<key>4DD30082-AABC-4CFA-8FC3-0738FA31C350</key>
<array>
<dict>
Expand Down Expand Up @@ -60,7 +83,7 @@
<key>concurrently</key>
<true/>
<key>escaping</key>
<integer>98</integer>
<integer>0</integer>
<key>script</key>
<string>/usr/local/bin/${vscodeEdition} {query}</string>
<key>scriptargtype</key>
Expand All @@ -77,29 +100,6 @@
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>concurrently</key>
<true/>
<key>escaping</key>
<integer>98</integer>
<key>script</key>
<string>open -a Finder {query}</string>
<key>scriptargtype</key>
<integer>0</integer>
<key>scriptfile</key>
<string></string>
<key>type</key>
<integer>0</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>76A26469-7BB5-46C5-ADFE-C95581EB9B95</string>
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -147,6 +147,29 @@
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>concurrently</key>
<true/>
<key>escaping</key>
<integer>98</integer>
<key>script</key>
<string>open -a Finder {query}</string>
<key>scriptargtype</key>
<integer>0</integer>
<key>scriptfile</key>
<string></string>
<key>type</key>
<integer>0</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>76A26469-7BB5-46C5-ADFE-C95581EB9B95</string>
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand All @@ -170,6 +193,128 @@
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>concurrently</key>
<false/>
<key>escaping</key>
<integer>0</integer>
<key>script</key>
<string>/usr/local/bin/${vscodeEdition} "{query}"</string>
<key>scriptargtype</key>
<integer>0</integer>
<key>scriptfile</key>
<string></string>
<key>type</key>
<integer>0</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>7F96C0AC-981E-4579-AFF4-CB907D33CAC4</string>
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>anchorfields</key>
<true/>
<key>argumenttrimmode</key>
<integer>0</integer>
<key>argumenttype</key>
<integer>0</integer>
<key>daterange</key>
<integer>0</integer>
<key>fields</key>
<array>
<dict>
<key>field</key>
<string>kMDItemDisplayName</string>
<key>not</key>
<false/>
<key>split</key>
<true/>
<key>value</key>
<string>{query}</string>
<key>words</key>
<true/>
</dict>
<dict>
<key>field</key>
<string>kMDItemAlternateNames</string>
<key>not</key>
<false/>
<key>split</key>
<true/>
<key>value</key>
<string>{query}</string>
<key>words</key>
<true/>
</dict>
<dict>
<key>field</key>
<string>kMDItemFinderComment</string>
<key>not</key>
<false/>
<key>split</key>
<true/>
<key>value</key>
<string>{query}</string>
<key>words</key>
<true/>
</dict>
</array>
<key>includesystem</key>
<false/>
<key>keyword</key>
<string>vs</string>
<key>runningsubtext</key>
<string></string>
<key>scopes</key>
<array>
<string>~</string>
</array>
<key>subtext</key>
<string>Open within Visual Studio Code</string>
<key>title</key>
<string>Visual Studio Code</string>
<key>types</key>
<array/>
<key>withspace</key>
<true/>
</dict>
<key>type</key>
<string>alfred.workflow.input.filefilter</string>
<key>uid</key>
<string>48B1068B-C755-4DBE-BDAB-9F24B0EE3354</string>
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>concurrently</key>
<false/>
<key>escaping</key>
<integer>0</integer>
<key>script</key>
<string>/usr/local/bin/${vscodeEdition} --new-window "{query}"</string>
<key>scriptargtype</key>
<integer>0</integer>
<key>scriptfile</key>
<string></string>
<key>type</key>
<integer>0</integer>
</dict>
<key>type</key>
<string>alfred.workflow.action.script</string>
<key>uid</key>
<string>0344F04E-AC60-4847-AA73-E093D16BBB46</string>
<key>version</key>
<integer>2</integer>
</dict>
</array>
<key>readme</key>
<string># Alfred Visual Studio Code Project Manager Workflow
Expand Down Expand Up @@ -204,13 +349,27 @@ Simply type `vsc` followed by space to list all projects. Optionally type a sear
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>
<key>uidata</key>
<dict>
<key>0344F04E-AC60-4847-AA73-E093D16BBB46</key>
<dict>
<key>xpos</key>
<integer>520</integer>
<key>ypos</key>
<integer>550</integer>
</dict>
<key>16C325FD-9D57-4988-9A88-CE69B2EF34FA</key>
<dict>
<key>xpos</key>
<integer>520</integer>
<key>ypos</key>
<integer>300</integer>
</dict>
<key>48B1068B-C755-4DBE-BDAB-9F24B0EE3354</key>
<dict>
<key>xpos</key>
<integer>120</integer>
<key>ypos</key>
<integer>420</integer>
</dict>
<key>4DD30082-AABC-4CFA-8FC3-0738FA31C350</key>
<dict>
<key>xpos</key>
Expand All @@ -225,6 +384,13 @@ Big Thanks to [Cloudstek](https://github.com/Cloudstek) for his [Alfred Atom Wor
<key>ypos</key>
<integer>180</integer>
</dict>
<key>7F96C0AC-981E-4579-AFF4-CB907D33CAC4</key>
<dict>
<key>xpos</key>
<integer>520</integer>
<key>ypos</key>
<integer>420</integer>
</dict>
<key>8A722A20-D801-4DAC-AA32-80052ADC87D4</key>
<dict>
<key>xpos</key>
Expand All @@ -247,7 +413,7 @@ Big Thanks to [Cloudstek](https://github.com/Cloudstek) for his [Alfred Atom Wor
<string>terminalApp</string>
</array>
<key>version</key>
<string>1.1.0</string>
<string>1.2.0</string>
<key>webaddress</key>
<string>https://github.com/konstantinbueschel/alfred-vs-code</string>
</dict>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "alfred-vs-code",
"version": "1.0.0",
"version": "1.2.0",
"author": "Konstantin Büschel <konstantin.bueschel@gmail.com>",
"description": "Alfred workflow that allows you to browse and open Visual Studio Code projects",
"dependencies": {
"alfred-workflow-nodejs": "^2.0.1",
"fs-extra": "^4.0.1",
"fuzzaldrin": "^2.1.0"
},
"author": "Konstantin Büschel <konstantin.bueschel@gmail.com>",
"license": "MIT"
}

0 comments on commit cb48d95

Please sign in to comment.