在MySQL Workbench查询中更改注释字体颜色 [英] Change comment font color in MySQL Workbench query

查看:532
本文介绍了在MySQL Workbench查询中更改注释字体颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将字体颜色从浅灰色更改为更鲜艳的颜色

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();

我当前在Windows 7 OS上使用MySQL Workbench版本6.0.9.11421

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

推荐答案

实际上,您要更改的是语法突出显示的颜色.这些颜色存储在xml文件中,并且目前没有用于更改它们的GUI.但是您可以直接编辑xml文件(重新启动MySQL Workbench以获取所有更改).在您的MySQL Workbench安装目录中查找文件code_editor.xml.

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.

每种受支持的MySQL服务器都有以下部分:

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.

这篇关于在MySQL Workbench查询中更改注释字体颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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