0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Finderの右クリックメニューに「VS Codeで開く」を追加する方法

Last updated at Posted at 2025-11-05

Finder から右クリックで VS Code で選択したフォルダ・ファイルを開く方法です。
ターミナルを使用せず、Finder から素早く Visual Studio Code を起動できるようになります。

手順

1. Automator を起動

macOS 標準アプリ「Automator」を起動し、次の操作を行います。

  • 「新規書類」を選択
  • 「クイックアクション」を選択

2. ワークフロー条件を設定

以下のように設定します。

項目 設定
ワークフローが受け取る現在の項目 ファイルまたはフォルダ
検索対象 Finder

3. シェルスクリプトを追加

左側の検索バーで「シェル」と入力し、
「シェルスクリプトを実行」をワークフローにドラッグします。

設定は以下の通りにします。

項目 設定
シェル /bin/zsh
入力の引き渡し方法 引数として

スクリプト欄に以下を入力します。

sh open -a "Visual Studio Code" "$@"

4. 保存

Command + S で保存します。
名前は以下のようにすると分かりやすいです。

  • Visual Studio Codeで開く
  • Open with Visual Studio Code

保存後、Finder でファイルまたはフォルダを右クリックし、
「クイックアクション」内に作成した項目が表示されれば設定完了です。

補足

作成したクイックアクションは以下のディレクトリに保存されます。

text ~/Library/Services

不要になった場合はこのフォルダから削除できます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?