-
Notifications
You must be signed in to change notification settings - Fork 7
/
R-IDE.sublime-settings
115 lines (108 loc) · 3.66 KB
/
R-IDE.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
// path to R, for example
// (mac, linux): "/usr/local/bin/R"
// (windows): "C:\\Program Files\\R\\R-x.y.z\\bin\\R.exe"
"r_binary": null,
// show R-IDE main menu
"r_ide_menu": true,
// this settings is used to add extra items to the R-IDE menu
// for example, user could add the following SendCode commands
// "menu_items": [
// {
// "caption": "Set Working Directory",
// "command": "send_code",
// "args": {"cmd": "setwd(\"${file_path:$folder}\")"}
// },
// {
// "caption": "Source Current File",
// "command": "send_code",
// "args": {"cmd": "source(\"$file\")"}
// }
// ],
"menu_items": [],
// this setting is used to dynamically generate the menu and build variants
"exec_items": [
{
"caption": "Install Package",
"cmd": "devtools::install()",
"selector": "meta.package.r"
},
{
"caption": "Install Package Locally",
"cmd": "devtools::install(quick = TRUE)",
"selector": "meta.package.r"
},
{
"caption": "Test Package",
"cmd": "devtools::test()",
"subdir": "tests/testthat",
"file_regex": "^(.*?\\.(?:R|r)):(\\d+):(\\d+)? (.*)$",
"selector": "meta.package.r"
},
{
"caption": "Test Active File",
"cmd": "devtools::test_active_file(\"$file\")",
"subdir": "tests/testthat",
"file_regex": "^(.*?\\.(?:R|r):(\\d+):(\\d+)? (.*)$",
"selector": "meta.package.r source.r"
},
{
"caption": "Check Package",
"cmd": "devtools::check()",
"selector": "meta.package.r"
},
{
"caption": "Document Package",
"cmd": "devtools::document()",
"selector": "meta.package.r"
},
{
"caption": "Build Package Site",
"cmd": "pkgdown::build_site()",
"selector": "meta.package.r"
},
{
"caption": "Preview Package Site",
"cmd": "pkgdown::preview_site(preview = TRUE); Sys.sleep(0.1)",
"selector": "meta.package.r"
},
{
"caption": "Build README",
"cmd": "devtools::build_readme()",
"selector": "meta.package.r"
},
{
"caption": "-"
},
{
"caption": "Render R Markdown to HTML",
"cmd": "rmarkdown::render('$file_name', output_format = 'html_document', encoding = 'UTF-8')",
"working_dir": "$file_path",
"selector": "text.html.markdown.rmarkdown"
},
{
"caption": "Render R Markdown to PDF",
"cmd": "rmarkdown::render('$file_name', output_format = 'pdf_document', encoding = 'UTF-8')",
"working_dir": "$file_path",
"selector": "text.html.markdown.rmarkdown"
},
{
"caption": "Render R Markdown",
"cmd": "rmarkdown::render('$file_name', encoding = 'UTF-8')",
"working_dir": "$file_path",
"selector": "text.html.markdown.rmarkdown"
},
{
"caption": "Knit Rnw",
"cmd": "knitr::knit2pdf('$file_name')",
"working_dir": "$file_path",
"selector": "text.tex.latex.rsweave"
}
],
// use [Terminus](https://packagecontrol.io/packages/Terminus) build system
"terminus_exec": false,
// environment variable LANG
// "lang": "en_US.UTF-8",
// additional paths to PATH variable
"additional_paths": []
}