Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Two script editor things

Wednesday Grimm
Ex Libris
Join date: 9 Jan 2003
Posts: 934
01-28-2003 11:28
First thing:
Can we have an auto-indenter for the script editor? I know there's sorta one there now for when you're typing, but I mean one where you can select some text, hit a button, and it nicely formats it for you.

Second thing:
Copying text from windows and Ctrl-P pasting in to any SL editor (script, notecards) causes lots of "#"s to appear. Possibly these are unrecoginzed characters.

This makes it hard if you need to move a script out of SL then back in to SL for any reason (say you have a script that crashes you client). Or if you are overconfident and think you can write scripts in notepad during offhours and then import them.
Andrew Linden
Linden staff
Join date: 18 Nov 2002
Posts: 692
CTRL-shortcuts
01-30-2003 14:42
Just thought I would mention the various CTRL shortcuts for editing. All of these are
also avaiable in the [ Edit ] menu, with the key-combo indicated.

CTRL-a = select all
CTRL-c = copy to buffer
CTRL-v = paste from buffer
CTRL-x = cut to buffer
CTRL-y = redo
CTRL-z = undo

Note that CTRL-p is not defined above.

Also, if you select multiple lines of code and press "tab" (or SHIFT-tab) you will move all lines forward (back) one tablength. While we don't have auto-formating, this will help you shift chunks that were cut from another section of the script.
Wednesday Grimm
Ex Libris
Join date: 9 Jan 2003
Posts: 934
01-30-2003 14:59
Sorry, brain-fart, I mean CTRL-V. Do other people see the "#" problem I mention?

20 years ago at the Windows GUI design meeting...
"what combo do we use for paste?"
"control p"
"no good, that's already used for print"
"oh, well then how about control-v, for... Vaste!"
"Brilliant, it's completely un-intuitive AND it's right next to the letter for copy, so people can accidentally hit one when they mean the other and thus loose their work"
"yeah, lets put cut and undo real close too, to make things _really_ interesting for the ham-handed"
</rant>
Aaron Linden
Linden Lab Staff
Join date: 19 Nov 2002
Posts: 59
02-12-2003 18:19
Yes indeed, the paste routine replaces unrecognized characters with #. If you're seeing a lot of these, you'll want to try using an ASCII text editor rather that a "rich text" editor for your off-line scripting. For example, pasting from Word to the script editor often results in "smart quotes" being turned into dumb # marks.

Notepad should be pretty good about this, but it definitely allows characters that SL doesn't support.

As for auto-indent-the-selected-text, I'll add it to the request list--it sounds like a nice post-1.0 feature. :-)

Aaron