subline linux启动命令,如何从linux中的命令行打开Sublime Text 2文件到选项卡,而不是新窗口...

这篇博客介绍了如何在Sublime Text 2中以不同的方式打开文件,包括在当前窗口的新标签页中打开。主要方法有使用Sublime的命令行参数,如`subl -n filename`,以及通过不同命令行选项来控制文件或目录的打开方式。此外,还提供了其他几种打开新文件或窗口的替代方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题描述

我有ST2设置,所以我可以做’sublime file.txt’,它将在ST2窗口打开。但是如何在当前打开的窗口中的新选项卡中打开它?

最佳解决方法

尝试Sublime命令行帮助

subl –help Sublime Text 2 Build 2217

Usage: subl [arguments] [files] edit the given files

or: subl [arguments] [directories] open the given directories

or: subl [arguments] - edit stdin

Arguments:

--project : Load the given project

--command : Run the given command

-n or --new-window: Open a new window

-a or --add: Add folders to the current window

-w or --wait: Wait for the files to be closed before returning

-b or --background: Don't activate the application

-s or --stay: Keep the application activated after closing the file

-h or --help: Show help (this message) and exit

-v or --version: Show version and exit

--wait is implied if reading from stdin. Use --stay to not switch back

to the terminal when a file is closed (only relevant if waiting for a file).

Filenames may be given a :line or :line:column suffix to open at a specific

location.

打开新窗口后,应根据默认行为添加后续文件。

次佳解决方法

这适用于Ubuntu 12.04:

subl filename

要么

subl -n filename(如果您希望它在单独的窗口中打开)

第三种解决方法

subl fileName

如果你想打开一个新文件使用

subl -n new_file_name

第四种方法

另一种选择是:打开文件。

[sublime index.html script.js styles.css]

打开文件夹[sublime folderName]

参考资料

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值