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

From Second Life Wiki
Jump to navigation Jump to search
m (add {{multi-lang}})
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Multi-lang}}
{{multi-lang}}
<table>
<!-- Style Variables -->
<tr>
{{#vardefine:box|style="
<td>
background-color: gray;
<div>__TOC__</div>
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; 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>
<div style="padding: 10px 10px 10px 10px;">
I made a new lsl.lang file for gtksourceview2.0 which you can find [http://zeitenwerk.de/sandbox/lsl.lang.tar.gz here]<br>


<div style="color: #7460c0; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px; width: 650px;">
To install, just extract "lsl.lang" to: [Gnome Directory]/gtksourceview-2.0/language-specs<br>
It is for me: /usr/share/gtksourceview-2.0/language-specs<br>
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>
</div>
</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
[http://code.google.com/p/hilitelsl/downloads/detail?name=lsl.lang lsl.lang]
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>
<pre style="border:0; padding:0; background-color: transparent; color:black;">
  ___          _        _ _                                                   
|_ _|_ __  ___| |_ __ _| | |                                                 
  | || '_ \/ __| __/ _` | | |                                                 
  | || | | \__ \ || (_| | | |                                                 
|___|_| |_|___/\__\__,_|_|_|
</pre>


<div id="box" style="background-color: #e8dcfb;">
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>
<div style="padding: 10px 10px 10px 10px;">
[http://zeitenwerk.de/sandbox/lsl.lang-gtk1.tar.gz This] is an older lsl.lang 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>


<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>
</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
 
[http://code.google.com/p/hilitelsl/downloads/detail?name=lsl_editor.xml lsl_editor.xml]


<div style="color: #7460c0; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px; width: 650px;">
<pre style="border:0; padding:0; background-color: transparent; color:black;">
Download lslint for Linux from [http://w-hat.com/lslint/ w-hat] or via [http://w-hat.com/lslint/release/linux/lslint.bz2 this direct link].<br>
  ___          _        _ _                                                   
Extract lslint anywhere and make it executable (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 name it like LSLint or "LSL Syntax".<br><br>
|___|_| |_|___/\__\__,_|_|_|
Insert in the commands text area now:<br>
</pre>


<div style="border: black dashed 1px; width: 450px; padding: 10px 10px 10px 10px; background: #e5e5e5;">
Download lsl_editor.xml and save it anywhere.
<nowiki>#!/bin/sh</nowiki><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.  
[path to lslint]/lslint $GEDIT_CURRENT_DOCUMENT_NAME<br>
<br>
for me it is: ''~/lslint $GEDIT_CURRENT_DOCUMENT_NAME'' (home)<br>
<br>
</div>
Select for:
Input: Nothing<br>
Output: Display in bottom pane<br>
Applicability: All documents<br>
<br>
Now click ''close'' ^.~<br>
<br>
Open a new document, insert a LSL script and save it (you must always save before checking the syntax. Otherwise lslint will produce 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>
</td>
<table id="box" cellspacing=0 border=0 style="background-color: light-gray; {{NewStyle|border-radius|10px|moz=*|webkit=*}}"><tr><td style="padding:10px;">
<td style="vertical-align: top;">
[[Image:Gedit lsl theme.jpg|400px]]
<!--{{User:Kuraiko_Yoshikawa/sandbox/Menu Bar}}-->
</td></tr></table>
</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