css - 在cache.css主题文件中编辑R studio主题(ACE编辑器?)

标签 css r rstudio

在RStudio中,我找到了Rstudio中不同主题的cache.css文件。它们是文本文件,代码如下:

.ace_editor { border: 2px solid rgb(159, 159, 159); } .ace_editor.ace_focus { border: 2px solid #327fbd; } .ace_gutter { background: #232323; color: #F8F8F8; } .ace_print_margin { width: 1px; background: #232323; } .ace_scroller { background-color: #141414;
} .ace_text-layer { color: #F8F8F8; } .ace_cursor { border-left: 2px solid #A7A7A7; } .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #A7A7A7; } .ace_marker-layer .ace_selection { background: rgba(221, 240, 255, 0.20); } .multiselect
.ace_selection.start { box-shadow: 0 0 3px 0px #141414; border-radius: 2px; } .ace_marker-layer .ace_step { background: rgb(102, 82, 0); } .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(255, 255, 255, 0.25); } .ace_marker-layer
.ace_active_line { background: rgba(255, 255, 255, 0.031); } .ace_gutter_active_line { background-color: rgba(255, 255, 255, 0.031); } .ace_marker-layer .ace_selected_word { border: 1px solid rgba(221, 240, 255, 0.20); } .ace_invisible { color: rgba(255,
255, 255, 0.25); } .ace_keyword, .ace_meta { color:#CDA869; } .ace_constant, .ace_constant.ace_other { color:#CF6A4C; } .ace_constant.ace_character, { color:#CF6A4C; } .ace_constant.ace_character.ace_escape, { color:#CF6A4C; } .ace_invalid.ace_illegal
{ color:#F8F8F8; background-color:rgba(86, 45, 86, 0.75); } .ace_invalid.ace_deprecated { text-decoration:underline; font-style:italic; color:#D2A8A1; } .ace_support { color:#9B859D; } .ace_support.ace_constant { color:#CF6A4C; } .ace_fold { background-color:
#AC885B; border-color: #F8F8F8; } .ace_support.ace_function { color:#DAD085; } .ace_storage { color:#F9EE98; } .ace_variable { color:#AC885B; } .ace_string { color:#8F9D6A; } .ace_string.ace_regexp { color:#E9C062; } .ace_comment { fontSize:4pt;font-style:italic;
color:#996633; } .ace_variable { color:#7587A6; } .ace_xml_pe { color:#494949; } .ace_meta.ace_tag { color:#AC885B; } .ace_entity.ace_name.ace_function { color:#AC885B; } .ace_markup.ace_underline { text-decoration:underline; } .ace_markup.ace_heading
{ color:#CF6A4C; } .ace_markup.ace_list { color:#F9EE98; } .ace_indent-guide { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERH5zzBz5sz/AA5EBAYqeZXWAAAAAElFTkSuQmCC) right repeat-y; } .nocolor.ace_editor
.ace_line span {color:#CDA869 !important;} .ace_bracket {margin: 0 !important; border: 0 !important; background-color: rgba(255, 255, 255, 0.25);} .ace_marker-layer .ace_foreign_line {position: absolute; z-index: -1; background-color: rgb(65, 65, 65);}
.ace_marker-layer .ace_find_line {position: absolute; z-index: -1; background-color: rgb(134, 134, 134);} .ace_marker-layer .ace_active_debug_line {position: absolute; z-index: -1; background-color: rgb(137, 121, 38);} .ace_console_error { background-color:
rgb(65, 65, 65); }

我正在尝试编辑这些内容,我需要一些帮助。到目前为止,我只能通过查找并更改“ace.comment”命令后指示的颜色来更改“评论”的颜色。但我想做一些类似的事情,比如背景颜色、文本颜色、R 中命令的颜色、大括号的颜色等。

这可能吗?如果是这样,我需要编辑哪些内容才能实现此目的?

最佳答案

是的,确实有可能。 (记得每次更改后重新启动Rstudio)

我没有关于 ACE 的经验,但是理解不同变量的含义并不难......例如

.ace_constant.ace_numeric {
  color: #4ef971;
}  
...

.ace_string {
  color: #6A8F9D;
 }
...
.ace_keyword {
 color: #85cfda;
 }

分别是数字对象、字符串和关键字的颜色(内置函数和控制台)

关于css - 在cache.css主题文件中编辑R studio主题(ACE编辑器?),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37635237/

相关文章:

html - 子菜单 :before transition

r - 在 R 中的 ggplot 中使用 geom_bump 时出现 Statbump 错误消息

r - 使用 Rcpp 就地编辑后 sum 函数出现问题

终端中的 Rscript 产生 "Error: RStudio not running"

Jquery 跳到一个 div 上然后下来

javascript - Safari 的网站问题

html - 数据表和 css 样式

R ggplot2 用下标和波浪号注释

html - 使用 R Markdown 在 HTML 演示文稿中建立超链接

带有 MAC 的 RODBC 不起作用。使用 unixODBC 和 Rstudio