User:Kuraiko Yoshikawa/sandbox/LSL Goodies/gedit

From Second Life Wiki
Jump to navigation Jump to search

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 have create a new lsl.lang file for gtksourceview2.0 you can find it here

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

This is a older lsl.lang file orginal 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 direct link
extract lslint anywhere and make it execute (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 give him a name 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 ever save bevor check the syntax otherwise lslint have 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 15:00, 13 May 2008 (PDT)