【问题标题】:Sublime Text 4: open multiple windows from terminalSublime Text 4:从终端打开多个窗口
【发布时间】:2021-08-11 20:00:43
【问题描述】:

Sublime Text 4 刚刚发布。已实现从 Sublime Text 3/2 的行为更改。在新的 Sublime Text 4 中,如果一个窗口已经打开,当用户(我)从终端使用 $ subl . 命令时,它会将我带到 当前打开 Sublime文本窗口。这不是我想要的行为。

以前在 Sublime 3/2 中,随后使用 $ subl . 命令将在此目录中打开一个新的 Sublime Text 窗口(我现在将有 2 个单独的窗口,都在此目录中,所有这些项目的子目录都在侧边栏)。

我如何让 Sublime Text 4 从终端打开 Additional Windows? 我想从终端打开同一个项目中的多个窗口。

谢谢。

【问题讨论】:

  • @oguzismail 您是否有理由继续删除sublimetext4 标签?它是一个新的和显着不同的版本,足以保证一个特定于版本的标签,就像我们有sublimetext2sublimetext3 的标签一样。添加标签可以为帖子提供信息,因为答案很可能是特定于版本的,删除标签可能会损害它。标签wiki已经详细填写了,看不出有什么问题。
  • @MattDMo 是的,这正是我的想法。我没有轻易添加新标签,但鉴于这是一个具有重大更改和附加功能的新版本,我预计未来几年会有许多新的 Sublime Text 4 特定问题。感谢您保留它。

标签: sublimetext sublimetext4


【解决方案1】:

命令行参数-n--new-window 告诉subl 创建一个新窗口。

λ subl --help
Sublime Text build 4106

Usage: subl [arguments] [files]         Edit the given files
   or: subl [arguments] [directories]   Open the given directories
   or: subl [arguments] -- [files]      Edit files that may start with '-'
   or: subl [arguments] -               Edit stdin

Arguments:
  --project <project>:    Load the given project
  --command <command>:    Run the given command
  -n or --new-window:     Open a new window
  --launch-or-new-window: Only open a new window if the application is open
  -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
  --safe-mode:            Launch using a sandboxed (clean) environment
  -h or --help:           Show help (this message) and exit
  -v or --version:        Show version and exit

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

【讨论】:

    猜你喜欢
    • 2020-08-20
    • 2013-04-18
    • 2013-11-18
    • 1970-01-01
    • 2013-12-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多