简体   繁体   中英

how to open files in vscode from integrated terminal

Is there a way to open files in the current vscode text editor window from the integrated terminal, or do I always have to use the file browser on the side? This would be really helpful for opening occasional files that don't really need to be part of my current workspace. Additionally if this allowed me to edit files as sudo that would be awesome.

You can open the directory you are in by typing code . or a specific directory by using code <dir name> and you can open files with the same thing code <file name> you can even open multiple files eg. code inde.html style.css

Hope that answers the question

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM