【问题标题】:Sublime Automatic Build System Text FilesSublime 自动构建系统文本文件
【发布时间】:2014-01-22 02:28:04
【问题描述】:

我正在尝试创建一个构建系统,该系统将检测扩展名为 .txt 的文件,然后使用我提供的程序。我知道它与范围有关,但我似乎无法让它发挥作用。

selector
如果工具|构建系统 |设置了自动选项,Sublime Text会通过匹配selector到文件的作用域,自动为活动文件找到对应的构建系统。

-https://docs.sublimetext.io/guide/usage/build-systems.html

{"cmd": ["cmd", "/k", "python C:\\Users\\Daniel\\Documents\\MyProgramming\\NotesTODO\\notesTODOs.py $file", "$file"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "scope.txt",
"shell": "true"}

【问题讨论】:

    标签: sublimetext2 text-files sublimetext sublimetext3 build-system


    【解决方案1】:

    试试这个:

    {
        "cmd": ["cmd", "/k", "python C:\\Users\\Daniel\\Documents\\MyProgramming\\NotesTODO\\notesTODOs.py", "$file"],
        "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
        "selector": "text.plain",
        "shell": "true"
    }
    

    首先,$file"cmd" 行中列出了两次,所以我删除了一个。其次,纯文本的范围是text.plain(还有text.htmltext.tex.latex等)。你可能不需要file_regex,但我不认为它会伤害任何东西,所以这是你的电话。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-01-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-07
      • 1970-01-01
      相关资源
      最近更新 更多