2

Running Sublime Text 3 with the Anaconda IDE package on Mac OS X, it appears that when I edit the .sublime-project file, for some reason some of the changes will be removed after some time.

Any ideas how to prevent this?

Before

{
    "build_systems":
    [
        {
            "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
            "name": "Anaconda Python Builder",
            "selector": "source.python",
            "shell_cmd": "~/anaconda/envs/test/bin/python -u \"$file\"",
            "env": {
                "PYTHONPATH": "/Users/nyx/test"
            }
        }
    ],

After

env setting is removed. Not sure what triggers this

{
    "build_systems":
    [
        {
            "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
            "name": "Anaconda Python Builder",
            "selector": "source.python",
            "shell_cmd": "~/anaconda/envs/test/bin/python -u \"$file\"",
        }
    ],
MattDMo
  • 100,794
  • 21
  • 241
  • 231
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
  • The whole build_systems part of the project file is regularly re-written to the above even if its removed completely. – shoojoe May 24 '18 at 14:53
  • It is infuriating that Anaconda (or anyone else for that matter) rewrites project files. That is exactly what we try to avoid when we use Sublime instead of IDEs. – jpsecher Sep 13 '22 at 14:33

1 Answers1

1

If it's having a problem with the 'env' tag and resetting it, can you try extra_paths?

{
    "settings": {
        "extra_paths":
        [
            "/Users/nyx/test"
        ]
    }
}
Michelle Welcks
  • 3,513
  • 4
  • 21
  • 34
  • @Nyxynyx This is the correct answer. The "Anaconda Python Builder" is spot-checked by the plugin on occasion and rewritten (for whatever reason), so if you want to customize it you'll need to write your own. For extending Anaconda's path, `"extra_paths"` is the right way to go. – MattDMo Nov 15 '15 at 16:10
  • Thanks for the confirmation MattDMo. – Michelle Welcks Nov 16 '15 at 15:33
  • According to https://stackoverflow.com/questions/38229009/anaconda-ignoring-extra-paths-in-sublime-text-settings#comment63910722_38229009 `extra_paths` is for linting not for building, which is what @Nyxynyx was asking about. – shoojoe May 24 '18 at 14:52