用Lua设计Scite?

用Lua设计Scite?,lua,scite,Lua,Scite,我想设置Scite的样式,所以它以默认样式启动-但是我想通过运行命令将样式更改为一种不同的暗样式。因此,经过一番挖掘,我在scitelufunctions.lua中找到了这个脚本,我将它映射到工具菜单中的一个命令: ——http://scite.ruteam.ru/archive/1.59 本地函数编码RGB(颜色) 如果string.sub(color,1,1)=“#”和string.len(color)>6,那么 return tonumber(string.sub(color,6,7)…s

我想设置Scite的样式,所以它以默认样式启动-但是我想通过运行命令将样式更改为一种不同的暗样式。因此,经过一番挖掘,我在
scitelufunctions.lua中找到了这个脚本,我将它映射到工具菜单中的一个命令:

——http://scite.ruteam.ru/archive/1.59
本地函数编码RGB(颜色)
如果string.sub(color,1,1)=“#”和string.len(color)>6,那么
return tonumber(string.sub(color,6,7)…string.sub(color,4,5)…string.sub(color,2,3),16)
其他的
返回颜色
结束
结束
函数changeTarkTheme()
-- http://www.scintilla.org/PaneAPI.html
-- http://www.scintilla.org/SciTEFAQ.html “如何将SciTE更改为使用黑色作为背景色?”
-- http://www.scintilla.org/SciTEDoc.html
--颜色计算的工作原理如下:
--~GB={r=100,g=100,b=100}--好的
--~mycolor=(mycolrorgb.r+(mycolrorgb.g*256)+(mycolrorgb.b*65536))--好的
--但也可以使用encodeRGB:
myBackgroundColor=encodeRGB(“282C34”)
StyleBack[32]=myBackgroundColor--mods background,但没有文本
editor.StyleBack[33]=myBackgroundColor——行号的mods背景
结束
然后,当我运行这个命令时,我得到如下结果:

问题是:

  • 默认背景仅更改(文本)字符(包括换行符/空行)未占用的背景;我想修改这个背景色太多
    • 编辑:多亏@EgorSkriptunoff的评论,才得以(通过手动实验值)获得与此相同颜色的整个背景(至少在编辑
      sciteluaffunctions.lua
      时是如此,对于
      lua
      语法着色,但对于
      cpp
      它也可以工作):。。。除此之外,我不知道样式2、4、5、6等记录在哪里,因为它们不在常见问题解答或上面片段中链接的其他文档中?!那么,是否有一个数字样式的列表,以及它们的变化
    • 
      editor.StyleBack[32] = myBackgroundColor -- mods background, but where there no text
      editor.StyleBack[33] = myBackgroundColor -- mods background of line numbers
      editor.StyleBack[0] = myBackgroundColor -- mods background of whitespace/indents
      editor.StyleBack[2] = myBackgroundColor -- mods background of commented lines
      editor.StyleBack[4] = myBackgroundColor -- mods background of numbers at uncommented lines
      editor.StyleBack[5] = myBackgroundColor -- mods background of reserved keywords (function) at uncommented lines
      editor.StyleBack[6] = myBackgroundColor -- mods background of strings ("...") at uncommented lines
      editor.StyleBack[10] = myBackgroundColor -- mods background of equal signs, etc at uncommented lines
      editor.StyleBack[11] = myBackgroundColor -- mods background of regular variables at uncommented lines
      editor.StyleBack[14] = myBackgroundColor -- mods background of predef functions (string.sub) at uncommented lines
  • 如果我打开一个新选项卡,新样式将消失-如果我返回到上一个选项卡,新样式也将消失;相反,我希望样式能够一直保持,直到通过脚本显式重置,或者直到关闭

是否有可能通过Lua脚本实现这些功能,如果有,如何实现?

谢谢@EgorSkriptunoff-代码中已经有了链接;我在想lua该怎么办,干杯<代码>对于i=0,63 do editor.StyleBack[i]=0x282C34 end
非常感谢,@EgorSkriptunoff-这很有效-除了分隔行号的垂直线和文本区域不会改变其背景色。我对数值做了一些实验,似乎并不是所有从0到63的数字样式都需要更改;所以我在上面编辑了我的作品。。干杯样式集取决于正在编辑的文件的语言(每个
.properties
文件定义自己的样式,样式0-31是特定于语言的)。
props[“fold.margin.color”]=0x282C34;道具[“fold.margin.highlight.color”]=0x282C34
谢谢@EgorSkriptunoff-已经在代码中链接了它;我在想lua该怎么办,干杯<代码>对于i=0,63 do editor.StyleBack[i]=0x282C34 end非常感谢,@EgorSkriptunoff-这很有效-除了分隔行号的垂直线和文本区域不会改变其背景色。我对数值做了一些实验,似乎并不是所有从0到63的数字样式都需要更改;所以我在上面编辑了我的作品。。干杯样式集取决于正在编辑的文件的语言(每个
.properties
文件定义自己的样式,样式0-31是特定于语言的)。
props[“fold.margin.color”]=0x282C34;道具[“折叠.边距.突出显示.颜色”]=0x282C34