I want to open a new tab and open a file using vscode
terminal.
like open somefile.js
command, so I can use ls
and open file quickly.
使用code -r <file>
在最后一个活动代码窗口中打开文件
use
code -r <filename>
just remeber to install the code command to PATH
. in VScode, open the command palette and type "code", you should see a Shell Command: Install code to PATH option.
I really haven't actually seen any difference between using the command without the -r
flag.
If you are already in VSCode terminal (not an external OS terminal), check out the latest VSCode 1.64 (Jan. 2022) Terminal shell integration<\/strong><\/a> :
<\/h2>
Since we know the
cwd<\/code><\/strong> for each line in the terminal buffer, we can support opening links in the terminal relative to the cwd at the location where it was activated<\/strong> .
Clicking on the file name will result invscode\/package.json<\/code> opening.
Clicking on the file name will opentemplate-string-converter\/package.json<\/code> .
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.