LoginSignup
37
32

More than 5 years have passed since last update.

Check! Mac のターミナルから Visual Studio Code を呼ぼう

Last updated at Posted at 2016-03-18

こんにちは、オークファンの @dz_ こと大平かづみです。

Prologue - はじめに

Visual Studio Code は何かと重宝してます。新しい職場でも、新しい Mac にももちろんインストール済みです。

いつものように、ターミナルから code コマンドで呼べるように設定しました。

Mac のシェルに code コマンドを登録する

Visual Studio Code で、 View > Command Palette... (または Shift + Command + p) でコマンドパレットを開きます。

shell と入力すると、「Shell Command: Install 'code' command in PATH」と表示されるので、実行してください。

20160318_vscode_001.png

"Shell command 'code' successfully installed in PATH" とインストールが完了すれば準備OKです。

動作確認

ターミナルを起動して、動作確認してみましょう。

# 指定したファイルを Visual Studio Code で開く
code some.txt

# カレントディレクトリを Visual Studio Code で開く
code .

Epilogue - おわりに

これ意外と便利ですので、ぜひ設定をおすすめします♪

37
32
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
37
32