alfred-code icon indicating copy to clipboard operation
alfred-code copied to clipboard

Add File Action to open selected file in VS Code?

Open chrisspiegl opened this issue 2 years ago • 3 comments

Would it be possible to add a default File action Open with Visual Studio Code so that files and folders can be opened directly from the Alfred File Browser?

chrisspiegl avatar Dec 29 '21 08:12 chrisspiegl

I just did that manually, but maybe you'd like to add this to this workflow by default? Here is a screenshot showing how I set the File Action up.

However, currently this is limited to work only with one selected file. If I select multiple, it does not work (probably because of the query parameter which is forwarded to the script).

Capture 2021-12-29 at 09 27 46

chrisspiegl avatar Dec 29 '21 08:12 chrisspiegl

you can enter code [filename/folder] and open it with vscode, but file must be exist

shaodahong avatar Dec 29 '21 08:12 shaodahong

@shaodahong What I am looking for is to use the file actions since I really like accessing files with Universal Actions / File Browser.

Mainly this is interesting because I am already with the file, I don't want to try to "search for it" in Alfred.

chrisspiegl avatar Dec 29 '21 08:12 chrisspiegl