Conditions | 1 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | # coding=utf-8 |
||
15 | @staticmethod |
||
16 | def run(file): |
||
17 | """Expand variables and open the resulting file. |
||
18 | |||
19 | NOTE: For some unknown reason the `open_file` command doesn't expand |
||
20 | ${platform} when called by `run_command`, so it is expanded here. |
||
21 | """ |
||
22 | platform_name = { |
||
23 | 'osx': 'OSX', |
||
24 | 'windows': 'Windows', |
||
25 | 'linux': 'Linux', |
||
26 | }[sublime.platform()] |
||
27 | file = file.replace('${platform}', platform_name) |
||
28 | sublime.run_command('open_file', {'file': file}) |
||
29 | |||
52 |