Emacs LSL Mode (xlsl-mode) for Linden Scripting Language

Get your Xah Particle Maker today!
, , …,

This is the home page of “xlsl-mode”, a Emacs mode for editing Linden Scripting Language.

new version at 1.6.0: Added name completion and snippet for 18 new LL functions.

Features

Menu

xlsl-mode
xlsl-mode, showing its menu. Screenshot on Mac

Syntax Coloring

Opening any file ending in “.lsl” will syntax color the file.

Reference Lookup

To lookup documentation of the word under cursor, type 【Ctrl+c Ctrl+r】. It'll switch you to the web browser of the function's documentation page at lslwiki.net.

Type 【Ctrl+c Ctrl+f】 to lookup a second reference site. By default the second site is http://wiki.secondlife.com/wiki/LSL_Portal.

Comment Uncomment Code

Type 【Alt+;】 to add comment. Select the text first to comment out a block of code.

Keyword Completion

Typing 【Esc Tab ↹】 will complete the word to the left of cursor to one of LSL's keyword. The keyword also includes all LSL constants (such as “ALL_SIDES”).

xlsl-keyword completion
xlsl-mode on the Mac showing command completion.

Tip: If you are looking for a function that has a name “key” in it, but you don't remember how it starts, you can type 【Esc Tab ↹】 on a blank line, then it will list all lsl keywords. Then, you can switch cursor to the completion panel and do standard search. This works for any function or event handler or predefined CONSTANTS.

Function Templates

If your cursor is at the end of the word “llSensorRepeat”, press Tab ↹, then it becomes:

llSensorRepeat(string name, key id, integer type, float range, float arc, float rate)

The template set supports all 34 events and 358 functions, and you can easily add your own.

For templates to work, you need to install yasnippets. See: Emacs Templates with YASnippet.

Coloring Vectors

You can have your vector types colored by their own value. This is useful when you work with colors often, such as particle shows, dance floors.

xlsl-mode color vectors
Colored vectors.

To color, select a region, then pull the menu 〖LSL ▸ Color vectors in region〗, or type 【Alt+x xlsl-color-vectors-region】.

To view a colored vector that's too dark, just select the text.

Convert RGB Color Format

You can convert RGB color values between hexidecimal format and LSL vector format. For example, if your cursor is on the word #cc90ff, then type 【Ctrl+c Ctrl+g】 or 【Alt+x xlsl-convert-rgb】, then it'll become <0.8000,0.5647,1.0000>, and vice versa.

If you need a color palette, and their hex values, type 【Alt+x list-colors-display】.

emacs colors
output of “list-color-display”

Copying to Second Life

To copy the whole file content, type 【Ctrl+c Ctrl+c】.

More Features and Customization Tips

See: Emacs LSL-mode; More Features and Customization.

Buy xlsl-mode Now

Buy the mode for just $5. Use the paypal button below. In the comment field, put “emacs lsl mode”. I'll email you the files. Make sure your email address is included and correct.

Want to dash through walls?
Try Xah Tele-Dasher!
blog comments powered by Disqus