这个问题说明了一切。
如何打开VS Code编辑器
windows cmd Linux和MAC终端
例如,为记事本++我写
>开始记分卡+测试。txt
顺便说一下,编辑器很棒(跨平台)!谢谢你,纳德拉!
你可以从微软下载
这个问题说明了一切。
如何打开VS Code编辑器
windows cmd Linux和MAC终端
例如,为记事本++我写
>开始记分卡+测试。txt
顺便说一下,编辑器很棒(跨平台)!谢谢你,纳德拉!
你可以从微软下载
当前回答
对于linux Debian,可以完成以下操作
$ export PATH=$PATH:/usr/share/code
然后运行它
$ code
$ code file.py
$ code workingdir
其他回答
在Linux和Mac的情况下,您希望使用'cd'命令导航到您提取VSCode文件的目录。例如:
cd ~/Downloads/VSCode
然后运行..启动应用程序。
./Code
'Code'是可执行文件的名称。
如果你在机器上有根访问权限,你可以配置系统,允许你从任何地方通过链接到/usr/bin来启动VSCode,那里通常存储着到可执行文件的链接。
sudo ln -s /path/to/VSCode/folder/Code /usr/bin/Code
你现在可以在任何地方通过输入以下命令启动VSCode:
Code
有时从vscode命令面板设置路径不工作
而是手动添加你的VS Code到你的路径:
在终端运行 Sudo nano /etc/paths 转到文件底部,输入要添加的路径 按control-x退出。输入“Y”保存修改后的缓冲区。 重新启动终端并测试echo $PATH。你应该做些类似的事情
~ echo $PATH /Users/shashank/.nvm/versions/node/v8.9.2/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/资源/app/bin . txt
下一次,您将从终端导航到项目文件夹
输入:
代码。
or
代码/道路/ /项目
源
在DOS命令提示符中输入“code”对我来说很有用
根据文档:
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.
对于linux Debian,可以完成以下操作
$ export PATH=$PATH:/usr/share/code
然后运行它
$ code
$ code file.py
$ code workingdir