gedit set the color of background

来源:互联网 发布:免费的阅读软件 编辑:程序博客网 时间:2024/05/10 16:25

All the config file are in the direction:  /usr/share/gtksourceview-2.0/styles/

Create a new one , such as "diy.xml"

Add the content:

 

<?xml version="1.0" encoding="UTF-8"?>

<style-scheme id="diy" _name="protecting" version="1.0">
  <author>voider</author>
  <_description>Protect eyes scheme</_description>


  <!-- The scheme tries to look like the default GVim scheme,
       since it is also what the hardwired GtkSourceView 1 color
       scheme did -->

  <!-- Palette -->
  <color name="blue"       value="#0000FF"/>
  <color name="magenta"    value="#FF00FF"/>
  <color name="violet"     value="#6A5ACD"/>
  <color name="cyan"       value="#008A8C"/>
  <color name="green"      value="#2E8B57"/>
  <color name="bordeaux"   value="#A52A2A"/>
  <color name="red"        value="#FF0000"/>
  <color name="yellow"     value="#FFFF00"/>
  <color name="purple"     value="#A020F0"/>

  <!--my new color -->
  <color name="doushalu"   value="#B4EEB4"/>

  <!-- Global Settings -->
  <style name="text"                        foreground="#red" background="doushalu"/>


  <!-- Bracket Matching -->
  <style name="bracket-match"               foreground="#white" background="#grey" bold="true"/>
  <style name="bracket-mismatch"            foreground="#white" background="#red" bold="true"/>

  <!-- Search Matching -->
  <style name="search-match"                background="yellow"/> 
 
  <!-- Comments -->
  <style name="def:comment"                 foreground="blue"/>
  <style name="def:shebang"                 foreground="blue" bold="true"/>
  <style name="def:doc-comment-element"     italic="true"/>

  <!-- Constants -->
  <style name="def:constant"                foreground="magenta"/>
  <style name="def:special-char"            foreground="violet"/>

  <!-- Identifiers -->
  <style name="def:identifier"              foreground="cyan"/>

  <!-- Statements -->
  <style name="def:statement"               foreground="bordeaux" bold="true"/>

  <!-- Types -->
  <style name="def:type"                    foreground="green" bold="true"/>

  <!-- Others -->
  <style name="def:preprocessor"            foreground="purple"/>
  <style name="def:error"                   background="red" bold="true"/>
  <style name="def:note"                    foreground="blue" background="yellow" bold="true"/>
  <style name="def:underlined"              italic="true" underline="true"/>

  <!-- Language specific styles -->
  <style name="diff:added-line"             foreground="#008B8B"/>
  <style name="diff:removed-line"           foreground="#6A5ACD"/>
  <style name="diff:changed-line"           use-style="def:preprocessor"/>
  <style name="diff:special-case"           use-style="def:constant"/>
  <style name="diff:location"               use-style="def:statement"/>
  <style name="diff:diff-file"              use-style="def:type"/>

  <style name="xml:tags"                    foreground="cyan"/>
  <style name="xml:attribute-name"          foreground="violet"/>
  <style name="xml:namespace"               foreground="green" bold="true"/>

  <style name="js:object"                   foreground="#2E8B57" bold="true"/>
  <style name="js:constructors"             foreground="#008B8B"/>

  <style name="latex:display-math"          foreground="#6A5ACD"/>
  <style name="latex:command"               foreground="#2E8B57" bold="true"/>
  <style name="latex:include"               use-style="def:preprocessor"/>

  <style name="sh:variable"                 foreground="#6A5ACD"/>

  <!-- legacy styles for old lang files -->
  <style name="Others"                      foreground="#2E8B57" bold="true"/>
  <style name="Others 2"                    foreground="#008B8B"/>
  <style name="Others 3"                    foreground="#6A5ACD"/>

</style-scheme>