Change comment font color in MySQL Workbench query

最后都变了- 提交于 2019-12-10 22:01:36

问题


Is it possible to change the font color from a light grey to something more vibrant

    # GET TODAY'S EVENTS ONLY <- this is the font I want to change
    where event_date = CURDATE();

I am currently using MySQL Workbench version 6.0.9.11421 on Windows 7 OS


回答1:


What you want to change in fact is the colors for syntax highlighting. These colors are stored in an xml file and there's currently no GUI to change them. But you can edit the xml file directly (restart MySQL Workbench to pick up any change). Look for the file code_editor.xml in your MySQL Workbench installation directory.

There are sections for each supported MySQL server like:

<?xml version="1.0" encoding="utf-8"?>
<languages>
  <language name="SCLEX_MYSQL">
    <!-- This is the base language setting. It's usually not directly used, but provides values shared by
         more specialized MySQL versions. -->

    <!-- Lexer properties -->
    <property name="fold" value="1" />
    <property name="fold.compact" value="0" />
    <property name="fold.comment" value="1" />
    ...
    <style id="1" fore-color="#A0A0A0" /> <!-- SCE_MYSQL_COMMENT -->
    <style id="2" fore-color="#A0A0A0" /> <!-- SCE_MYSQL_COMMENTLINE -->
    ...
  </language>
  ...
</languages>

There are a number style tags each specifying a forground and background color (and styling like bold, italic) for each type of token. This is where you can adjust the colors to whatever you like. Make a copy of the original file in case you need to restore it.



来源:https://stackoverflow.com/questions/26401408/change-comment-font-color-in-mysql-workbench-query

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!