2

Is it possible to write Python(Sublime Text API) in a .sublime-snippet file.

Like if I want to grab a value from .sublime-settings file and insert it into a snippet.

Example:
File random.sublime-settings consists of

[
{
  "key1": "value1";
  "key2": "value2"
}
]

So if I want to insert "value1" and "value2" in a snippet, how do I do it?, First off is there a way this is even possible?.

1 Answer 1

3

Unfortunately, you cannot execute code with .sublime-snippet files. In order to do what you want to do, you'll need to write a plugin. To execute it, you can either bind a key combination to it, or create a macro.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.