Skip to content

Instantly share code, notes, and snippets.

@GeekaholicLin
Last active August 11, 2019 02:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GeekaholicLin/4fdf940c5ab93784096fe189a75c0969 to your computer and use it in GitHub Desktop.
Save GeekaholicLin/4fdf940c5ab93784096fe189a75c0969 to your computer and use it in GitHub Desktop.
windows环境的命令行下使用visual studio code创建或打开文件
  1. 先将visual studio code 的安装目录(有着code.exe的文件)添加到环境变量Path中

2.使用一下命令:

code -- opens Visual Studio Code 
code . -- opens current directory in Visual Studio Code 
code somefile -- opens somefile in Visual Studio Code

3.如果想从vsc中打开目录所在的命令行窗口,使用ctrl + Shift + P搜索command,找到open new command prompt,回车即可。

【update:如果想打开visual studio code的集成终端,使用命令ctr+shift+`】

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment