在cache.css主题文件中编辑R studio主题(ACE编辑器?) [英] Editing R studio theme in cache.css theme file (ACE editor?)

查看:94
本文介绍了在cache.css主题文件中编辑R studio主题(ACE编辑器?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

In RStudio, I have found the cache.css files for the different themes in Rstudio. They are text files with code like this:

.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中的命令颜色,大括号的颜色等进行类似的操作.

I am trying to edit in these, and I could use some help. So far, I have only been able to change the colour of "comments" by finding and changing the colour indicated after the "ace.comment" command. But I would like to do something similar with things like the background colour, text colour, and colour of commands in R, colour of curly brackets, etc, etc.

这可能吗?如果是这样,我需要编辑哪些内容才能完成此任务?

Is this possible? If so, what things do I need to edit in order to accomplish this?

推荐答案

是的,确实有可能.(请记住,每次更改后都要重新启动Rstudio)

Yes it is indeed possible. (Remember to restart Rstudio after each change)

我没有ACE方面的经验,但是要获得不同变量的含义并不难.例如

I have no experience about ACE stuff, but it's not so hard to get the meaning of the different variables.. e.g

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

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

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

are, respectively, colors of numeric objects, strings and keywords (built in-functions and console)

这篇关于在cache.css主题文件中编辑R studio主题(ACE编辑器?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆