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

From Second Life Wiki
Jump to navigation Jump to search
m (add new version of the lsl.lang files)
m (add {{multi-lang}})
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{User:Kuraiko_Yoshikawa/sandbox/Menu Bar}}
{{multi-lang}}
{{Multi-lang}}
<!-- Style Variables -->
<div>__TOC__</div>
{{#vardefine:box|style="
==gedit as LSL offline Editor==
background-color: gray;
<div style="background-color: light-gray">
color: black;
<div style="padding: 0.5em">
font-size: 1.2em;
[http://www.gnome.org/projects/gedit/ gedit] is the official text editor of the [http://www.gnome.org/ GNOME] desktop environment.<br>
font-weight: bold;
While aiming at simplicity and ease of use, gedit is a powerful general purpose text editor.
border-bottom: black 1px dashed; 
</div></div>
-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


==LSL Syntax Highlighting==
[http://code.google.com/p/hilitelsl/downloads/detail?name=lsl2.lang lsl2.lang]


<div id="box" style="background-color: light-gray">
<pre style="border:0; padding:0; background-color: transparent; color:black;">
<div style="background-color: gray; color: black; 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
  | || '_ \/ __| __/ _` | | |                                                 
'''Updated:'''
  | || | | \__ \ || (_| | | |                                                 
25 March 2009 → [http://zeitenwerk.de/sandbox/lsl-gtk2.tar.gz lsl-gtk2.tar.gz]
|___|_| |_|___/\__\__,_|_|_|
'''Archiv:'''
</pre>
13 May 2008 → [http://zeitenwerk.de/sandbox/lsl.lang.tar.gz lsl.lang.tar.gz]<br>


<div style="color: black; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px;">
To install put the '''lsl.lang''' in '''/usr/share/gtksourceview-2.0/language-specs''' and restart gedit.
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>


<div id="box" style="background-color: light-gray;">
<pre style="border:0; padding:0; background-color: transparent; color:black;">
<div style="background-color: gray; color: black; font-size: 1.2em; font-weight: bold; border-bottom: black 1px dashed">For gtksourceview1.0</div>
  ___          _        _ _                                                   
<div style="padding: 10px 10px 10px 10px;">
|_ _|_ __  ___| |_ __ _| | |                                                 
'''Updated:'''
  | || '_ \/ __| __/ _` | | |                                                 
25 March 2009 → [http://zeitenwerk.de/sandbox/lsl-gtk1.tar.gz lsl-gtk1.tar.gz]<br>
  | || | | \__ \ || (_| | | |                                                 
'''Archiv:'''
|___|_| |_|___/\__\__,_|_|_|
13 May 2008 → [http://zeitenwerk.de/sandbox/lsl.lang-gtk1.tar.gz lsl.lang-gtk1.tar.gz]<br>
</pre>


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>
To install put the '''lsl.lang''' in '''/usr/share/gtksourceview-1.0/language-specs''' and restart gedit.


<div style="color: black; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px; 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: light-gray;; 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: black; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px;">
<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: light-gray; padding: 10px 10px 10px 10px;">
[[Image:Gedit lsl theme.jpg]]
<div style="color: black; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px;">
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]] 05:24, 25 March 2009 (UTC)
</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 06: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