-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsublime-q.sublime-settings
63 lines (63 loc) · 2.58 KB
/
sublime-q.sublime-settings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
"connections": [],
"default_new_connection": "localhost:5555",
"use_completion": "True",
"phantom_preview_limit": "20",
//these will be copied to sublime's cache when the plugin is loaded so that they can be used by output html generated from chart routine
"scripts": [
"Packages/q KDB/js/canvasjs/canvasjs.min.js",
"Packages/q KDB/js/canvasjs/q.js"
],
//custom q routines - you should not edit this file directly, but add your routine to ${sublime-dir}/Packages/User/sublime-q.sublime-settings instead
"routines": [
{
"name": "chart",
"description": "plot last query result in html/js chart (need table)",
"preload_qcode_file": "Packages/q KDB/js/canvasjs/canvasjs.q",
"command": {"qstatement": ".j.j .st.chart.buildChart .st.tmp"},
"render": {"template_file": "Packages/q KDB/js/canvasjs/canvasjs_template.html"}
},
{
"name": "table",
"description": "show last query result in html/js table (need table)",
"command": {"qstatement": "{{.j.j (`pageLength`data`columns)!(25; flip value flip 0!x; {{(enlist `title)!enlist x}} each cols 0!x)}} .st.tmp"},
"render": {"template_file": "Packages/q KDB/js/datatable/datatable_template.html"}
},
{
"name": "show",
"description": "show variable at cursor",
"command": {"qstatement": ".Q.s {0}", "output": "q_out_panel"}
},
{
"name": "show (popup)",
"description": "show variable at cursor to popup",
"command": {"qstatement": ".Q.s {0}", "output": "q_out_popup"}
},
{
"name": "meta",
"description": "show type of variable at cursor",
"command": {"qstatement": "{{.Q.s $[.Q.qt x;meta x;100h=type x;value x;.Q.ty each x]}} {0}", "output": "q_out_panel"}
},
{
"name": "meta (popup)",
"description": "show type of variable at cursor to popup",
"command": {"qstatement": "{{.Q.s $[.Q.qt x;meta x;100h=type x;value x;.Q.ty each x]}} {0}", "output": "q_out_phantom"}
},
{
"name": "show environment",
"description": "show environment",
//need to escape { and } with {{ and }}
"command": {"qstatement": ".Q.s ((enlist `ns)!(enlist(key `) except `q`Q`h`j`o)),{{(`$/:x )! system each x }} \"dvabf\"", "output": "q_out_panel"}
},
{
"name": "show memory",
"description": "show memory",
"command": {"qstatement": ".Q.s .Q.w[]", "output": "q_out_panel"}
},
{
"name": "list tables",
"description": "list tables in q sessions",
"command": {"qstatement": ".Q.s (tables `.)!cols each tables `.", "output": "q_out_panel"}
}
]
}