这个问题说明了一切。
如何打开VS Code编辑器
windows cmd Linux和MAC终端
例如,为记事本++我写
>开始记分卡+测试。txt
顺便说一下,编辑器很棒(跨平台)!谢谢你,纳德拉!
你可以从微软下载
这个问题说明了一切。
如何打开VS Code编辑器
windows cmd Linux和MAC终端
例如,为记事本++我写
>开始记分卡+测试。txt
顺便说一下,编辑器很棒(跨平台)!谢谢你,纳德拉!
你可以从微软下载
当前回答
第一步:用你想要的名字创建一个。bat文件,例如vcode .bat 步骤2:编写到Visual Studio Code的路径 第三步:保存到C:\Windows\System32目录下
**
C:
cd Users\Bino\AppData\Local\Programs\Microsoft VS Code
Code.exe**
步骤4:你可以在任何地方通过输入“vscode”(这是你的bat文件的名字)调用visual studio代码
其他回答
根据文档:
Mac OS X Download Visual Studio Code for Mac OS X. Double-click on VSCode-osx.zip to expand the contents. Drag Visual Studio Code.app to the Applications folder, making it available in the Launchpad. Add VS Code to your Dock by right-clicking on the icon and choosing Options, Keep in Dock. Tip: If you want to run VS Code from the terminal, append the following to your ~/.bash_profile file (~/.zshrc in case you use zsh). code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;} Now, you can simply type code . in any folder to start editing files in that folder. Tip: You can also add it to VS Code Insiders build by changing "com.microsoft.VSCodeInsiders". Also if you don't to type the whole word code, just change it to c. Linux Download Visual Studio Code for Linux. Make a new folder and extract VSCode-linux-x64.zip inside that folder. Double click on Code to run Visual Studio Code. Tip: If you want to run VS Code from the terminal, create the following link substituting /path/to/vscode/Code with the absolute path to the Code executable sudo ln -s /path/to/vscode/Code /usr/local/bin/code Now, you can simply type code . in any folder to start editing files in that folder.
这适用于Windows:
CMD> start vscode://file/o:/git/libzmq/builds/msvc/vs2017/libzmq.sln
但是如果文件路径有空格,通常会在它周围加上双引号,就像这样:
CMD> start "vscode://file/o:/git/lib zmq/builds/msvc/vs2017/libzmq.sln"
但是这将使start混乱,它可以接受双引号标题,因此它将创建一个以此名称作为标题的窗口,而不打开项目。
CMD> start "title" "vscode://file/o:/git/lib zmq/builds/msvc/vs2017/libzmq.sln"
你也可以在终端上运行VS Code,在将其添加到路径后输入代码:
启动VS代码。 打开命令面板(⌘P),输入shell命令,在PATH命令中找到shell命令:Install code命令。 Mac shell命令
重新启动终端,使新的$PATH值生效。您将能够键入代码。在任何文件夹中开始编辑该文件夹中的文件。
第一步:用你想要的名字创建一个。bat文件,例如vcode .bat 步骤2:编写到Visual Studio Code的路径 第三步:保存到C:\Windows\System32目录下
**
C:
cd Users\Bino\AppData\Local\Programs\Microsoft VS Code
Code.exe**
步骤4:你可以在任何地方通过输入“vscode”(这是你的bat文件的名字)调用visual studio代码
对于linux Debian,可以完成以下操作
$ export PATH=$PATH:/usr/share/code
然后运行它
$ code
$ code file.py
$ code workingdir