Difference between revisions of "User:Kuraiko Yoshikawa/sandbox/LSL Goodies/gedit"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{Multi-lang}} <div>__TOC__</div> ==gedit as LSL offline Editor== <div style="background-color: #e8dcfb; min-width: 700px;"> <div style="padding: 0.5em"> [http://www.gnome.org/projects/ge...)
 
m (add {{multi-lang}})
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Multi-lang}}
{{multi-lang}}
<div>__TOC__</div>
<!-- Style Variables -->
{{#vardefine:box|style="
background-color: gray;
color: black;
font-size: 1.2em;
font-weight: bold;
border-bottom: black 1px dashed; 
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
padding-left: 5px;
"}}
{{#vardefine:codetab|style="border: 1px solid black; background-color: #323232; {{NewStyle|border-radius|10px|moz=*|webkit=*}}"}}
<!-- END -->
<div id="box" style="background-color: light-gray; {{NewStyle|border-radius|10px|moz=*|webkit=*}}">
<div {{#var:box}}>gtksourceview2.0 <span style="display: none;"><h2>gtk2</h2></span></div>
<div style="padding: 10px">
<pre style="border:0; padding:0; background-color: transparent; color:black;">
_____ _ _     
|  ___(_) | ___
| |_  | | |/ _ \
|  _| | | |  __/
|_|  |_|_|\___|
</pre>
You can find the syntax file (and others) in our Google Code Project


==gedit as LSL offline Editor==
[http://code.google.com/p/hilitelsl/downloads/detail?name=lsl2.lang lsl2.lang]
<div style="background-color: #e8dcfb; min-width: 700px;">
<div style="padding: 0.5em">
[http://www.gnome.org/projects/gedit/ gedit] is the official text editor of the [http://www.gnome.org/ GNOME] desktop environment.<br>
While aiming at simplicity and ease of use, gedit is a powerful general purpose text editor.
</div></div>


==LSL Syntax Highlighting==
<pre style="border:0; padding:0; background-color: transparent; color:black;">
  ___          _        _ _                                                   
|_ _|_ __  ___| |_ __ _| | |                                                 
  | || '_ \/ __| __/ _` | | |                                                 
  | || | | \__ \ || (_| | | |                                                 
|___|_| |_|___/\__\__,_|_|_|
</pre>


<div id="box" style="background-color: #e8dcfb;padding: 10px 10px 10px 10px; min-width: 700px;">
To install put the '''lsl.lang''' in '''/usr/share/gtksourceview-2.0/language-specs''' and restart gedit.
<div style="background-color: #cfc0e0; font-size: 1.2em; font-weight: bold; border-bottom: black 1px dashed">For gtksourceview2.0</div>


I have create a new lsl.lang file for gtksourceview2.0 you can find it [http://zeitenwerk.de/sandbox/lsl.lang.tar.gz here]<br>
</div>
</div>
<table id="box" cellspacing=0 border=0 style="background-color: light-gray; {{NewStyle|border-radius|10px|moz=*|webkit=*}}"><tr><td style="padding:10px;">
[[Image:Gedit lsl highlight.jpg|400px]]
</td></tr></table>
 
<div id="box" style="background-color: light-gray; {{NewStyle|border-radius|10px|moz=*|webkit=*}}">
<div {{#var:box}}>gtksourceview1.0<span style="display: none;"><h2>gtk1</h2></span></div>
<div style="padding: 10px">
<pre style="border:0; padding:0; background-color: transparent; color:black;">
_____ _ _     
|  ___(_) | ___
| |_  | | |/ _ \
|  _| | | |  __/
|_|  |_|_|\___|
</pre>
You can find the syntax file (and others) in our Google Code Project


<div style="color: #7460c0; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px; width: 650px;">
[http://code.google.com/p/hilitelsl/downloads/detail?name=lsl.lang lsl.lang]
To install, just extract "lsl.lang" to: [Gnome Directory]/gtksourceview-2.0/language-specs<br>
This file orginaly created by Nargus Asturias via the [http://forums.secondlife.com/showthread.php?p=1134163 Scripting Tips forum] updated by [http://adammarker.org/shill/ adammarker.org/shill/] and me ^.~<br>


It is for me: /usr/share/gtksourceview-2.0/language-specs<br>
<pre style="border:0; padding:0; background-color: transparent; color:black;">
and restart gedit
  ___          _        _ _                                                   
</div>
|_ _|_ __  ___| |_ __ _| | |                                                 
<div style="border: gray solid 1px; width: 410px; height: 276px; margin: 10px 10px 10px">
  | || '_ \/ __| __/ _` | | |                                                 
[[Image:Gedit lsl highlight.jpg|center]]
  | || | | \__ \ || (_| | | |                                                  
</div>
|___|_| |_|___/\__\__,_|_|_|
</div>
</pre>


<div id="box" style="background-color: #e8dcfb; padding: 10px 10px 10px 10px;">
To install put the '''lsl.lang''' in '''/usr/share/gtksourceview-1.0/language-specs''' and restart gedit.
<div style="background-color: #cfc0e0; font-size: 1.2em; font-weight: bold; border-bottom: black 1px dashed">For gtksourceview1.0</div>
This is a older lsl.lang file orginal created by Nargus Asturias via the [http://forums.secondlife.com/showthread.php?p=1134163 Scripting Tips forum] updated by [http://adammarker.org/shill/ adammarker.org/shill/] and me ^.~<br>


<div style="color: #7460c0; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px; width: 650px; margin-bottom: 10px;">
To install, just extract "lsl.lang" to: [Gnome Directory]/gtksourceview-1.0/language-specs<br>
It is for me: /usr/share/gtksourceview-1.0/language-specs<br>
and restart gedit
</div>
</div>
</div>
</div>


== Syntax Check ==
<div id="box" style="background-color: light-gray; {{NewStyle|border-radius|10px|moz=*|webkit=*}}">
<div id="box" style="background-color: #e8dcfb; padding: 10px 10px 10px 10px; min-width: 700px;">
<div {{#var:box}}>gedit Color Theme like InWorld Editor (old style)<span style="display: none;"><h2>theme</h2></span></div>
A simple syntax checker for gedit based on lslint
<div style="padding: 10px">
<pre style="border:0; padding:0; background-color: transparent; color:black;">
_____ _ _     
|  ___(_) | ___
| |_  | | |/ _ \
|  _| | | |  __/
|_|  |_|_|\___|
</pre>
You can find the syntax file (and others) in our Google Code Project


<div style="color: #7460c0; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px; width: 650px;">
[http://code.google.com/p/hilitelsl/downloads/detail?name=lsl_editor.xml lsl_editor.xml]
download lslint for linux from [http://w-hat.com/lslint/ w-hat] or [http://w-hat.com/lslint/release/linux/lslint.bz2 direct link]<br>
extract lslint anywhere and make it execute (chmod 750 lslint or right click on the file properties/permissions)<br><br>
Now open gedit click edit/preferences/plugins and activate "external tools"<br>
select "configure plugin"<br>
in the new window click new and give him a name like LSLint or "LSL Syntax"<br><br>
insert in the commands text area now:<br>


<div style="border: black dashed 1px; width: 450px; padding: 10px 10px 10px 10px; background: #e5e5e5;">
<pre style="border:0; padding:0; background-color: transparent; color:black;">
<nowiki>#!/bin/sh</nowiki><br>
  ___          _        _ _                                                   
<br>
|_ _|_ __  ___| |_ __ _| | |                                                 
[path to lslint]/lslint $GEDIT_CURRENT_DOCUMENT_NAME<br>
  | || '_ \/ __| __/ _` | | |                                                 
<br>
  | || | | \__ \ || (_| | | |                                                 
for me it is: ''~/lslint $GEDIT_CURRENT_DOCUMENT_NAME'' (home)<br>
|___|_| |_|___/\__\__,_|_|_|
<br>
</pre>
</div>
 
Select for:
Download lsl_editor.xml and save it anywhere.
Input: Nothing<br>
Open gedit select '''Edit/Preferences/Font&Colors''', click '''Add''' and add the '''lsl_editor.xml''' file.
Output: Display in bottom pane<br>
Select '''LSL Editor''' in the Color Schemes list und close the preferences window.  
Applicability: All documents<br>
<br>
now click close ^.~<br>
<br>
Open a new document insert a LSL script and save it (you must ever save bevor check the syntax otherwise lslint have an error)<br>
click Tools and select "LSLint" or however you named it
</div>
<div style="width: 400px; height: 270px; margin-top: 10px;">
[[Image:Gedit lslint.png|left|400px]]
</div>
</div>


== gedit Color Theme like InWorld Editor (old style) ==
<div id="box" style="background-color: #e8dcfb; padding: 10px 10px 10px 10px; min-width: 700px;">
[[Image:Gedit lsl theme.jpg]]
<div style="color: #7460c0; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px; width: 650px;">
Download [http://zeitenwerk.de/sandbox/lsl_editor.xml.tar.gz lsl_editor.xml] and extract it anywhere<br>
open gedit select Edit/Preferences/Font&Colors click Add and add the lsl_editor.xml file<br>
select LSL Editor in the Color Schemes list und close the preferences window
</div>
</div>
<br>
[[User:Kuraiko Yoshikawa|Kuraiko Yoshikawa]] 15:00, 13 May 2008 (PDT)
</div>
</div>
<table id="box" cellspacing=0 border=0 style="background-color: light-gray; {{NewStyle|border-radius|10px|moz=*|webkit=*}}"><tr><td style="padding:10px;">
[[Image:Gedit lsl theme.jpg|400px]]
</td></tr></table>

Latest revision as of 05:54, 26 March 2009


gtksourceview2.0

gtk2

 _____ _ _      
|  ___(_) | ___ 
| |_  | | |/ _ \
|  _| | | |  __/
|_|   |_|_|\___|

You can find the syntax file (and others) in our Google Code Project

lsl2.lang

  ___           _        _ _                                                    
 |_ _|_ __  ___| |_ __ _| | |                                                   
  | || '_ \/ __| __/ _` | | |                                                   
  | || | | \__ \ || (_| | | |                                                   
 |___|_| |_|___/\__\__,_|_|_| 

To install put the lsl.lang in /usr/share/gtksourceview-2.0/language-specs and restart gedit.

Gedit lsl highlight.jpg

gtksourceview1.0

gtk1

 _____ _ _      
|  ___(_) | ___ 
| |_  | | |/ _ \
|  _| | | |  __/
|_|   |_|_|\___|

You can find the syntax file (and others) in our Google Code Project

lsl.lang This file orginaly created by Nargus Asturias via the Scripting Tips forum updated by adammarker.org/shill/ and me ^.~

  ___           _        _ _                                                    
 |_ _|_ __  ___| |_ __ _| | |                                                   
  | || '_ \/ __| __/ _` | | |                                                   
  | || | | \__ \ || (_| | | |                                                   
 |___|_| |_|___/\__\__,_|_|_| 

To install put the lsl.lang in /usr/share/gtksourceview-1.0/language-specs and restart gedit.

gedit Color Theme like InWorld Editor (old style)

theme

 _____ _ _      
|  ___(_) | ___ 
| |_  | | |/ _ \
|  _| | | |  __/
|_|   |_|_|\___|

You can find the syntax file (and others) in our Google Code Project

lsl_editor.xml

  ___           _        _ _                                                    
 |_ _|_ __  ___| |_ __ _| | |                                                   
  | || '_ \/ __| __/ _` | | |                                                   
  | || | | \__ \ || (_| | | |                                                   
 |___|_| |_|___/\__\__,_|_|_| 

Download lsl_editor.xml and save it anywhere. Open gedit select Edit/Preferences/Font&Colors, click Add and add the lsl_editor.xml file. Select LSL Editor in the Color Schemes list und close the preferences window.

Gedit lsl theme.jpg