Skip to content

Conversation

@jlujan
Copy link

@jlujan jlujan commented Mar 22, 2014

Added code to find the project file and add $project_path var in
the settings file to prefix other paths. Also did this for
$working_dir. This is to avoid hard coded paths to virtualenvs
in your project settings. Getting the project file is straight
forward in ST3. In ST2, the code will search open folders to find
the first *.sublime-project file and load settings using JSON

  • Add ability to use $project_path in settings paths
  • Add ability to use $working_dir in settings paths

Added code to find the project file and add $project_path var in
the settings file to prefix other paths. Also did this for
$working_dir. This is to avoid hard coded paths to virtualenvs
in your project settings. Getting the project file is straight
forward in ST3. In ST2, the code will search open folders to find
the first *.sublime-project file and load settings using JSON

* Add ability to use $project_path in settings paths
* Add ability to use $working_dir in settings paths
@jlujan
Copy link
Author

jlujan commented Mar 22, 2014

I have tested this for my use cases in ST3 and ST2 using the following project file.

{
"folders": [
{
    "path": "/path/to/project/venv/"
}
],
...
"settings":
    {
        "python_interpreter_path": "$project_path/bin/python", #hacked Jedi like this as well
        "pylinter":
        {
            "working_dir": "$project_path",
            "python_bin": "$project_path/bin/python",
            "pylint_rc": "$project_path/.pylintrc"
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant