更改MySQLWorkbench中的语法高亮颜色

时间:2016-06-28 23:50:48

标签: mysql syntax-highlighting

有没有人知道如何在OSX上更改MySQLWorkbench中的语法高亮颜色?评论的灰色对我来说真的很难读。我确实看到this solution,但我怀疑这是针对Windows的,我在OSX的任何地方都看不到该文件。

2 个答案:

答案 0 :(得分:3)

你必须编辑code_editor。 xml文件并更改以下样式标记

<style id="1" fore-color="#A0A0A0" /> <!-- SCE_MYSQL_COMMENT -->
<style id="2" fore-color="#A0A0A0" /> <!-- SCE_MYSQL_COMMENTLINE -->
<style id="21" fore-color="#F77B09" back-color="#F0F0F0" /> <!-- SCE_MYSQL_HIDDENCOMMAND -->

<style id="3" fore-color="#A58E37" /> <!-- SCE_MYSQL_VARIABLE -->
<style id="4" fore-color="#A58E37" /> <!-- SCE_MYSQL_SYSTEMVARIABLE -->
<style id="5" fore-color="#A58E37" /> <!-- SCE_MYSQL_KNOWNSYSTEMVARIABLE -->

<style id="6" fore-color="#F0A030" /> <!-- SCE_MYSQL_NUMBER -->
<style id="12" fore-color="#209F20" /> <!-- SCE_MYSQL_SQSTRING -->
<style id="13" fore-color="#6D4A27" /> <!-- SCE_MYSQL_DQSTRING -->

<style id="7" fore-color="#007FBF" bold="Yes" /> <!-- SCE_MYSQL_MAJORKEYWORD -->
<style id="8" fore-color="#007FBF" bold="Yes"/> <!-- SCE_MYSQL_KEYWORD -->
<style id="15" fore-color="#C040C0" /> <!-- SCE_MYSQL_FUNCTION -->
<style id="10" fore-color="#C04000" bold="Yes" /> <!-- SCE_MYSQL_PROCEDUREKEYWORD -->
<style id="14" bold="Yes" /> <!-- SCE_MYSQL_OPERATOR -->

<style id="16" fore-color="#000000" /> <!-- SCE_MYSQL_IDENTIFIER -->
<style id="17" fore-color="#7D5A27" /> <!-- SCE_MYSQL_QUOTEDIDENTIFIER -->

<style id="22" fore-color="#FFFFFF" back-color="#A0A0A0" bold="Yes" /> <!-- SCE_MYSQL_PLACEHOLDER -->

<style id="18" fore-color="#007F00" /> <!-- SCE_MYSQL_USER1 -->

<!-- All styles again in their variant in a hidden command (with a 0x40 offset). -->
<style id="65" fore-color="#A0A0A0" back-color="#F0F0F0" /> <!-- SCE_MYSQL_COMMENT -->
<style id="66" fore-color="#A0A0A0" back-color="#F0F0F0" /> <!-- SCE_MYSQL_COMMENTLINE -->

/usr/share/mysql-workbench/data/code_editor.xml

在Ubuntu中,它将在以下位置提供(默认) 否则尝试使用locate命令和其他os在安装目录中找到

编辑此xml后重新启动工作台

   

   

       

 

答案 1 :(得分:0)

我找到了答案 - code_editor.xml文件位于应用程序内容的resources / data文件夹中。