Sublime Forum

Project based build system not taking precedence

#1

I have created a build system in my project settings file in order to create PDF file from a markdown file.

When I set “tools”-build-system to automatic, select my markdown file (having a .md extension, example README.md) and press CMD+B (on a mac) or select “tools”-“build” sublime build system create an HTML file based on file I selected and not the PDF as required. If I set build system to name of my project based build then it does create the required PDF file.

I am under the impression that when build is set to automatic that project based build will take precedence which is not happening in my case.

Here is my project based build

{
  "folders": [
    {
      "path": "."
    }
  ],
  "build_systems": [
    {
      "name": "md2pdf",
      "cmd": [
        "pandoc",
        "-o $file_base_name.trial.pdf",
        "$file_name"
      ],
      "selector": "text.html.markdown",
      "working_dir": "$file_path",
      "path": "/Library/TeX/texbin:$PATH"
    }
  ]
}

Pretty sure I am missing some salient point so help much appreciated.

BTW, this is with sublime text 3 build 3103

~C

0 Likes

#2

If you used a different build system previously, ST will continue to use that as long as it is applicable for the file you are editing, e.g. uses Markdown syntax or has some other form of limitation.

To manually select a new build system, hit Cmd+Shfit+B.

1 Like

#3

Thanks, kinda negates use of automatic mode but the CMD+Shift+B works well and will do the trick, thanks

0 Likes

#4

It is still automatic, it just makes a few more assumptions than previously but allows you to fix those easily if they are not exactly to your liking. It’s way more flexible and easier to use that way.

Previously you would always have to click some build system in the menu if “Automatic” did not choose the exact build system you wanted.

1 Like