Is the Sublime Text scope detector able to distinguish between Python 2.x and Python 3.x code? This could either be automatic or by looking at the set syntax - I am not sure how it works. If so, what value should be used instead of source.python
when defining the scope
tag in a snippet definition?
As an example, perhaps you have a ‘print’ snippet whose content is something like <![CDATA[print "$1:", $1]]>
. That works fine when you’re in Python 2.x, but as soon as you switch to a Python 3.x source file or project it no longer works. Leaving aside that the content can be re-jiggered to work in both cases, and the question of whether printing variable values like this is good practice (it’s just a simple example of something that changed between Python 2 and 3) - it would be nice to be able to define two snippets with the same tabTrigger but different scopes and content specific to the relevant scope. Is such a thing currently possible?