File tree Expand file tree Collapse file tree 3 files changed +32
-13
lines changed Expand file tree Collapse file tree 3 files changed +32
-13
lines changed Original file line number Diff line number Diff line change 18
18
"caption" : " TypeScript" ,
19
19
"children" : [
20
20
{
21
- "command" : " open_file" ,
22
- "args" : {
23
- "file" : " ${packages}/TypeScript/Preferences.sublime-settings"
24
- },
21
+ "command" : " typescript_open_plugin_default_setting_file" ,
25
22
"caption" : " Plugin Settings – Default"
26
23
},
27
24
{
35
32
"caption" : " -"
36
33
},
37
34
{
38
- "command" : " open_file" ,
39
- "args" : {
40
- "file" : " ${packages}/TypeScript/TypeScript.sublime-settings"
41
- },
35
+ "command" :" typescript_open_ts_default_setting_file" ,
42
36
"caption" : " TypeScript Settings – Default"
43
37
},
44
38
{
52
46
"caption" : " -"
53
47
},
54
48
{
55
- "command" : " open_file" ,
56
- "args" : {
57
- "file" : " ${packages}/TypeScript/TypeScriptReact.sublime-settings"
58
- },
49
+ "command" :" typescript_open_tsreact_default_setting_file" ,
59
50
"caption" : " TypeScriptReact Settings – Default"
60
51
},
61
52
{
Original file line number Diff line number Diff line change 29
29
TypescriptRenameCommand
30
30
)
31
31
from .build import TypescriptBuildCommand
32
+ from .settings import (
33
+ TypescriptOpenPluginDefaultSettingFile ,
34
+ TypescriptOpenTsDefaultSettingFile ,
35
+ TypescriptOpenTsreactDefaultSettingFile
36
+ )
32
37
33
38
__all__ = [
34
39
"TypescriptAutoIndentOnEnterBetweenCurlyBrackets" ,
59
64
"TypescriptShowDoc" ,
60
65
"TypescriptSignaturePanel" ,
61
66
"TypescriptSignaturePopup" ,
62
- "TypescriptBuildCommand"
67
+ "TypescriptBuildCommand" ,
68
+ "TypescriptOpenPluginDefaultSettingFile" ,
69
+ "TypescriptOpenTsDefaultSettingFile" ,
70
+ "TypescriptOpenTsreactDefaultSettingFile"
63
71
]
Original file line number Diff line number Diff line change
1
+ import sublime_plugin
2
+
3
+ from ..libs .global_vars import *
4
+ from ..libs import cli , logger
5
+ import os
6
+
7
+ class TypescriptOpenPluginDefaultSettingFile (sublime_plugin .WindowCommand ):
8
+ def run (self ):
9
+ default_plugin_setting_path = os .path .join (PLUGIN_DIR , "Preferences.sublime-settings" )
10
+ sublime .active_window ().open_file (default_plugin_setting_path )
11
+
12
+ class TypescriptOpenTsDefaultSettingFile (sublime_plugin .WindowCommand ):
13
+ def run (self ):
14
+ default_ts_setting_path = os .path .join (PLUGIN_DIR , "TypeScript.sublime-settings" )
15
+ sublime .active_window ().open_file (default_ts_setting_path )
16
+
17
+ class TypescriptOpenTsreactDefaultSettingFile (sublime_plugin .WindowCommand ):
18
+ def run (self ):
19
+ default_tsreact_setting_path = os .path .join (PLUGIN_DIR , "TypeScriptReact.sublime-settings" )
20
+ sublime .active_window ().open_file (default_tsreact_setting_path )
You can’t perform that action at this time.
0 commit comments