说明:代码取自 github 上的开源项目:gedit-super-monokai-theme

1. 准备

gedit 软件(这不废话吗)

2. 配置

新建一份空白文档,编辑它,复制黏贴以下代码进去:

<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (C) 2009 tm2gtksw2(Alexandre da Silva)

 This file was generated from a textmate theme named Monokai
 with tm2gtksw2 tool. (Alexandre da Silva)
 Modified by Andrey Serebryakov, 2011

 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Library General Public
 License as published by the Free Software Foundation; either
 version 2 of the License, or (at your option) any later version.

 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Library General Public License for more details.

 You should have received a copy of the GNU Library General Public
 License along with this library; if not, write to the
 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.
-->

<style-scheme id="monokaisuper" _name="MonokaiSuper" version="1.0">
  <author>tm2gtksw2(Alexandre da Silva)</author>
  <_description>GMate Theme - Generated from textmate theme with tm2gtksw2</_description>

  <style name="bracket-match"  background="#B6A922" bold="true" italic="true"/>
  <style name="bracket-mismatch"  background="#B6A922" underline="true"/>
  <style name="css:at-rules" foreground="#f92672"/>
  <style name="css:color" foreground="#ae81ff"/>
  <style name="css:keyword" foreground="#66d9ef" italic="true"/>
  <style name="current-line"  background="#3e3d32"/>
  <style name="cursor" foreground="#f8f8f0"/>
  <style name="def:base-n-integer" foreground="#ae81ff"/>
  <style name="def:boolean" foreground="#ae81ff"/>
  <style name="def:builtin" foreground="#ae81ff"/>
  <style name="def:character" foreground="#ae81ff"/>
  <style name="def:comment" foreground="#75715e"/>
  <style name="def:complex" foreground="#ae81ff"/>
  <style name="def:decimal" foreground="#ae81ff"/>
  <style name="def:doc-comment" foreground="#75715e"/>
  <style name="def:doc-comment-element" foreground="#75715e"/>
  <style name="def:error" foreground="#f8f8f0" background="#f92672"/>
  <style name="def:floating-point" foreground="#ae81ff"/>
  <style name="def:function" foreground="#a6e22e"/>
  <style name="def:keyword" foreground="#f92672"/>
  <style name="def:note" foreground="#75715e"/>
  <style name="def:number" foreground="#ae81ff"/>
  <style name="def:operator" foreground="#f92672"/>
  <style name="def:preprocessor" foreground="#66d9ef"/>
  <style name="def:reserved" foreground="#f92672"/>
  <style name="def:shebang" foreground="#75715e"/>
  <style name="def:special-char" foreground="#66d9ef"/>
  <style name="def:special-constant" foreground="#ae81ff"/>
  <style name="def:statement" foreground="#f92672"/>
  <style name="def:string" foreground="#e6db74"/>
  <style name="def:type" foreground="#66d9ef" italic="true"/>
  <style name="draw-spaces" foreground="#3b3a32"/>
  <style name="html:dtd" foreground="#e6db74"/>
  <style name="html:tag" foreground="#f92672"/>
  <style name="js:function" foreground="#66d9ef"/>
  <style name="line-numbers" foreground="#f8f8f2" background="#3e3d32"/>
  <style name="perl:builtin" foreground="#a6e22e"/>
  <style name="perl:include-statement" foreground="#f92672"/>
  <style name="perl:special-variable" foreground="#ae81ff"/>
  <style name="php:string" foreground="#e6db74"/>
  <style name="php:identifier" foreground="#a6e22e" bold="true"/>
  <style name="php:variable" foreground="#66D9EF"/>

  <style name="python:builtin-constant" foreground="#f92672"/>
  <style name="python:builtin-function" foreground="#a6e22e"/>
  <style name="python:module-handler" foreground="#f92672"/>
  <style name="python:special-variable" foreground="#f92672"/>
  <style name="ruby:attribute-definition" foreground="#f92672"/>
  <style name="ruby:global-variable" foreground="#a6e22e"/>
  <style name="ruby:module-handler" foreground="#f92672"/>
  <style name="ruby:predefined-variable" foreground="#ae81ff"/>
  <style name="ruby:regex" foreground="#e6db74"/>
  <style name="ruby:special-variable" foreground="#f92672"/>
  <style name="ruby:symbol" foreground="#ae81ff"/>
  <style name="rubyonrails:attribute-definition" foreground="#f92672"/>
  <style name="rubyonrails:block-parameter" foreground="#fd971f" italic="true"/>
  <style name="rubyonrails:class-inherit" foreground="#a6e22e" underline="true" italic="true"/>
  <style name="rubyonrails:class-name" foreground="#66d9ef" italic="true"/>
  <style name="rubyonrails:complex-interpolation" foreground="#ae81ff"/>
  <style name="rubyonrails:global-variable" foreground="#a6e22e"/>
  <style name="rubyonrails:module-handler" foreground="#f92672"/>
  <style name="rubyonrails:module-name" foreground="#66d9ef" italic="true"/>
  <style name="rubyonrails:predefined-variable" foreground="#ae81ff"/>
  <style name="rubyonrails:regex" foreground="#e6db74"/>
  <style name="rubyonrails:simple-interpolation" foreground="#ae81ff"/>
  <style name="rubyonrails:special-variable" foreground="#f92672"/>
  <style name="rubyonrails:symbol" foreground="#ae81ff"/>
  <style name="search-match"  background="#E8DA50" foreground="#999674"/>
  <style name="selection" foreground="#f8f8f2" background="#739927"/>
  <style name="text" foreground="#f8f8f2" background="#272822"/>
  <style name="xml:attribute-name" foreground="#a6e22e"/>
  <style name="xml:element-name" foreground="#f92672"/>
  <style name="xml:namespace" foreground="#f92672"/>
  <style name="xml:tag" foreground="#f92672"/>

  <style name="diff:added-line" background="lime"/>
  <style name="diff:removed-line" background="magenta"/>
  <style name="diff:changed-line" background="ambra"/>
  <style name="diff:special-case" use-style="def:string"/>
  <style name="diff:location" use-style="def:keyword"/>


</style-scheme>

保存,把文档命名为:monokai.xml

打开GEDIT,在顶部菜单栏中选择:编辑->首选项->字体和颜色,在界面左下方找到一个加号,点一下,找到 monokai.xml,双击导入,再在界面中选中这个配色方案(其实好像不选也是可以的)。完成。

分类: 文章

XZYQvQ

炒鸡辣鸡的制杖蒟蒻一枚QvQ

0 条评论

发表回复

Avatar placeholder

您的电子邮箱地址不会被公开。 必填项已用 * 标注