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

From Second Life Wiki
Jump to navigation Jump to search
m
m (add new version of the lsl.lang files)
Line 3: Line 3:
<div>__TOC__</div>
<div>__TOC__</div>
==gedit as LSL offline Editor==
==gedit as LSL offline Editor==
<div style="background-color: #e8dcfb;">
<div style="background-color: light-gray">
<div style="padding: 0.5em">
<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>
[http://www.gnome.org/projects/gedit/ gedit] is the official text editor of the [http://www.gnome.org/ GNOME] desktop environment.<br>
Line 11: Line 11:
==LSL Syntax Highlighting==
==LSL Syntax Highlighting==


<div id="box" style="background-color: #e8dcfb;">
<div id="box" style="background-color: light-gray">
<div style="background-color: #cfc0e0; font-size: 1.2em; font-weight: bold; border-bottom: black 1px dashed">For gtksourceview2.0</div>
<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;">
<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>
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:'''
13 May 2008 → [http://zeitenwerk.de/sandbox/lsl.lang.tar.gz lsl.lang.tar.gz]<br>


<div style="color: #7460c0; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px;">
<div style="color: black; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px;">
To install, just extract "lsl.lang" to: [Gnome Directory]/gtksourceview-2.0/language-specs<br>
To install, just extract "lsl.lang" to: [Gnome Directory]/gtksourceview-2.0/language-specs<br>


Line 28: Line 32:
</div>
</div>


<div id="box" style="background-color: #e8dcfb;">
<div id="box" style="background-color: light-gray;">
<div style="background-color: #cfc0e0; font-size: 1.2em; font-weight: bold; border-bottom: black 1px dashed">For gtksourceview1.0</div>
<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;">
<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>
'''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>


<div style="color: #7460c0; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px; margin-bottom: 10px;">
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: 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>
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>
It is for me: /usr/share/gtksourceview-1.0/language-specs<br>
Line 42: Line 51:


== Syntax Check ==
== Syntax Check ==
<div id="box" style="background-color: #e8dcfb; padding: 10px 10px 10px 10px; min-width: 700px;">
<div id="box" style="background-color: light-gray;; padding: 10px 10px 10px 10px; min-width: 700px;">
A simple syntax checker for gedit based on lslint
A simple syntax checker for gedit based on lslint


<div style="color: #7460c0; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px;">
<div style="color: black; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px;">
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>
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>
Extract lslint anywhere and make it executable (chmod 750 lslint or right click on the file properties/permissions).<br><br>
Line 77: Line 86:


== gedit Color Theme like InWorld Editor (old style) ==
== gedit Color Theme like InWorld Editor (old style) ==
<div id="box" style="background-color: #e8dcfb; padding: 10px 10px 10px 10px;">
<div id="box" style="background-color: light-gray; padding: 10px 10px 10px 10px;">
[[Image:Gedit lsl theme.jpg]]
[[Image:Gedit lsl theme.jpg]]
<div style="color: #7460c0; background: #d9d9d9; border: #132f78 dashed 1px; padding: 10px 10px 10px 10px;">
<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>
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>
Open gedit select Edit/Preferences/Font&Colors, click ''Add'' and add the lsl_editor.xml file.<br>
Line 85: Line 94:
</div>
</div>
<br>
<br>
[[User:Kuraiko Yoshikawa|Kuraiko Yoshikawa]] 15:00, 13 May 2008 (PDT)
--[[User:Kuraiko Yoshikawa|Kuraiko Yoshikawa]] 05:24, 25 March 2009 (UTC)
</div>
</div>

Revision as of 22:24, 24 March 2009

Inv item object.png Sandbox Inv item script.png SL Chatlog Wikifier | Inv folder object.png Kurai's LSL Goodies | Inv item script.png Zai's LSL Goodies Lovely Stuff Heart icon.png Zai's Page

gedit as LSL offline Editor

gedit is the official text editor of the GNOME desktop environment.
While aiming at simplicity and ease of use, gedit is a powerful general purpose text editor.

LSL Syntax Highlighting

For gtksourceview2.0

I made a new lsl.lang file for gtksourceview2.0 which you can find Updated: 25 March 2009 → lsl-gtk2.tar.gz Archiv: 13 May 2008 → lsl.lang.tar.gz

To install, just extract "lsl.lang" to: [Gnome Directory]/gtksourceview-2.0/language-specs

It is for me: /usr/share/gtksourceview-2.0/language-specs
and restart gedit

Gedit lsl highlight.jpg
For gtksourceview1.0

Updated: 25 March 2009 → lsl-gtk1.tar.gz
Archiv: 13 May 2008 → lsl.lang-gtk1.tar.gz

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

To install, just extract "lsl.lang" to: [Gnome Directory]/gtksourceview-1.0/language-specs
It is for me: /usr/share/gtksourceview-1.0/language-specs
and restart gedit.

Syntax Check

A simple syntax checker for gedit based on lslint

Download lslint for Linux from w-hat or via this direct link.
Extract lslint anywhere and make it executable (chmod 750 lslint or right click on the file properties/permissions).

Now open gedit click edit/preferences/plugins and activate "external tools".
Select "configure plugin".
In the new window click new and name it like LSLint or "LSL Syntax".

Insert in the commands text area now:

#!/bin/sh

[path to lslint]/lslint $GEDIT_CURRENT_DOCUMENT_NAME

for me it is: ~/lslint $GEDIT_CURRENT_DOCUMENT_NAME (home)

Select for: Input: Nothing
Output: Display in bottom pane
Applicability: All documents

Now click close ^.~

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).
Click Tools and select "LSLint" or however you named it.

Gedit lslint.png

gedit Color Theme like InWorld Editor (old style)

Gedit lsl theme.jpg

Download lsl_editor.xml and extract 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.


--Kuraiko Yoshikawa 05:24, 25 March 2009 (UTC)