Membuat Tampilan Gedit Lebih Nyaman Dengan Merubah Stylenya Secara Manual

Sab, 08/16/2014 - 03:39 -- bonny
gedit

Secara default tampilan Gedit kurang nyaman dimata, berikut ini adalah cara untuk menambah style sehingga Gedit lebih nyaman digunakan dan lebih enak dilihat.

Buatlah sebuah file baru yang bernama grobak.xml di direktori /usr/share/gtksourceview-3.0/styles/ dengan perintah berikut:

sudo vim /usr/share/gtksourceview-3.0/styles/grobak.xml

Kemudian isi dengan kode XML di bawah ini:

<?xml version="1.0" encoding="UTF-8"?>
<!--
 
 This file is part of GtkSourceView
 
 Copyright (C) 2014 Bonny Useful <bonny@grobak.net>
 GtkSourceView is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
 License as published by the Free Software Foundation; either
 version 2.1 of the License, or (at your option) any later version.
 
 GtkSourceView 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
 Lesser General Public License for more details.
 
 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-->
<style-scheme id="grobak" _name="Grobak" version="1.0">
  <author>Bonny Useful</author>
  <_description>Grobak.Net color 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="black"      value="#000000"/>
  <color name="g_black"    value="#050C00"/>
  <color name="gr_black"   value="#1d3f00"/>
  <color name="white"      value="#FFFFFF"/>
  <color name="blue"       value="#0000FF"/>
  <color name="magenta"    value="#FF00FF"/>
  <color name="green"      value="#74e600"/>
  <color name="violet"     value="#6A5ACD"/>
  <color name="orange"     value="#ff9d00"/>
  <color name="cyan"       value="#008A8C"/>
  <color name="gray"       value="#BEBEBE"/>
  <color name="light_gray" value="#e6e6e6"/>
  <color name="dark_gray"  value="#262626"/>
  <color name="red"        value="#FF0000"/>
  <color name="yellow"     value="#FFFF00"/>
  <color name="purple"     value="#A020F0"/>
 
  <!-- Global Settings -->
  <style name="text"                        foreground="light_gray" background="g_black"/>
  <style name="selection"                   foreground="white" background="dark_gray"/>
  <style name="current-line"                background="gray"/>
  <style name="draw-spaces"                 foreground="#babdb6"/>
  <style name="line-numbers"                foreground="dark_gray" background="black"/>
 
  <!-- Bracket Matching -->
  <style name="bracket-match"               foreground="white" background="gray" bold="true"/>
  <style name="bracket-mismatch"            foreground="white" background="red" bold="true"/>
  <!-- Right Margin -->
  <style name="right-margin"                foreground="#000000" background="#000000"/>
  <!-- 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="green"/>
  <style name="def:special-char"            foreground="violet"/>
 
  <!-- Identifiers -->
  <style name="def:identifier"              foreground="cyan"/>
 
  <!-- Statements -->
  <style name="def:statement"               foreground="orange" bold="true"/>
 
  <!-- Types -->
  <style name="def:type"                    foreground="magenta" bold="true"/>
 
  <!-- Others -->
  <style name="def:preprocessor"            foreground="purple"/>
  <style name="def:error"                   background="red" bold="true"/>
  <style name="def:warning"                 background="yellow"/>
  <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="magenta" 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>

Kemudian jalankan Gedit dan pilih menu Edit > Preferences > Font & Colors > Pilih Color Scheme Grobak.