Tab stops.
|
TheAmazing Sneerwell
Registered User
Join date: 6 Jun 2005
Posts: 3
|
06-18-2005 12:34
Hopefully this is the right forum for this.
Is there a way to keep the SL editor from eating my tabs and replacing them with four spaces? In my external editor (UE) I use tabs for indentions and generally leave my tab stops set to 8. I've been coding this way for years and old habits die hard. Using tabs and configurable tab stops lets multiple coders view the code in the way they are comfortable with.
It's possible to convert spaces to tabs in UE, but it's a pain every time you copy back and forth and it never catches them all.
Is there a reason SL is anti-tab? A setting I can change? I apologize if I've missed something obvious, I'm new.
Thanks!
|
Tya Fallingbridge
Proud Prim Whore
Join date: 28 Aug 2003
Posts: 790
|
06-18-2005 13:41
Welcome to SL! i am sure one of the talented scripters will be able to answser your question =)
|
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
06-18-2005 17:45
From: TheAmazing Sneerwell Is there a reason SL is anti-tab? A setting I can change? I apologize if I've missed something obvious, I'm new. Welcome  The script editor built into SL probably doesn't get any more bare-bones. (Im thankful it highlights keywords.) At the moment, there's no way to toggle tab settings, or even find-and-replace. I recommend scite-ez, an external editor that offers LSL code highlighting, as well as the tab settings you desire. ==Chris
|
Folco Boffin
Mad Moo Cow Cultist
Join date: 27 Feb 2005
Posts: 66
|
06-18-2005 20:05
I've never tried scite-ez, as I'm rather fond of UltraEdit myself. Been using it for quite a few versions. I would reccommend getting the wordfile for LSL though. I can't remember where to send you to get it, I think it's in the downloads section or something. If you can't find it, send me a message and I can send you the file. It's from version 1.5 I believe, but most of the syntax has proper highlighting (though in differant colors than the in-game editor by default). Can't think of anything that isn't offhand. Now that I'm thinking of it, I'm wondering if an updated version has been released or not as I'm too lazy to go through that file to find all of the commands to see if they are all there or not. But the highlighting definatly does make it a bit easier to catch your mistakes a lot of the time. *curses those missing brackets and the extra ones that appear from no-where* lol
|
TheAmazing Sneerwell
Registered User
Join date: 6 Jun 2005
Posts: 3
|
06-19-2005 09:21
Hi guys, thanks for the replies. I do have the word file for UltraEdit...syntax highlighting and tabs in UE are fine. Pasting from UE->SL editor is fine. It's pasting from SL->UE that removes all of my tabs and replaces them with spaces. So the question was "is there a way to make SL stop eating all of my tabs?" It appears the answer is "No, tabs are very tasty and high in essential vitamins." hehe! Thanks again.
|
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
|
06-19-2005 23:14
I guess the only answer is "DOn't paste form SL to UE"
I use Scite-ez and do all my script editing in it, and only paste form that into SL. Once in Sl if i find any mistakes or want to make any changes I do so in Scite then paste into Sl again.
Here's an idea tho. Could you run a find/replace in UE to replace 4 spaces with a tab? All you would need is the special character UE uses for a tab..
_____________________
"Bad News is - I cant script a thing.... Good News is - I buy less asprin than those who can " -Rosa Gardner
|
Folco Boffin
Mad Moo Cow Cultist
Join date: 27 Feb 2005
Posts: 66
|
06-20-2005 12:51
There's no need to do that really as UE has a feature to convert leading spaces to tabs. Though I've never had any trouble with it, from Sneerwell's description, it seems it doesn't always convert all the leading spaces. I find for me, it converts all the leading spaces to tabs. *shrug* Perhaps it's a differance in version, I have 11.00b+ according to the about box.
|
TheAmazing Sneerwell
Registered User
Join date: 6 Jun 2005
Posts: 3
|
06-20-2005 13:03
From: Folco Boffin There's no need to do that really as UE has a feature to convert leading spaces to tabs. Though I've never had any trouble with it, from Sneerwell's description, it seems it doesn't always convert all the leading spaces. I find for me, it converts all the leading spaces to tabs. *shrug* Perhaps it's a differance in version, I have 11.00b+ according to the about box. Yes, it does have that feature. There are a few problems with it. - I have my tabstop set to 8. SL always converts a tab to 4 spaces. In order to convert I have to go to the advanced config menu and change my settings, then change them back after the conversion. - It is also possible to just do ctrl-R and then seach for " " and replace with ^t, but this is haphazard and can have unintended results. - Somehow I always end up with odd spaces stuck randomly throughout the SL paste. If you uncomment something and forget to remove the space between // and your code and then hit enter, every line after that is going to have 5 spaces instead of four. Argh! This isn't a huge deal, I really just wanted to make sure there wasn't a setting somewhere I was missing that would prevent the conversion from happening in the first place, but it looks like there isn't so I'll soldier onward! It's more of a small annoyance than anything. Thanks for the help guys.
|
Folco Boffin
Mad Moo Cow Cultist
Join date: 27 Feb 2005
Posts: 66
|
06-20-2005 15:42
Theoretically, isn't a tab supposed to be 5 spaces? Why are we all using 4? (Well, except for those using 8  ) *shrug* I have my tabs set to 4 as that's what I've always used... unless the other few programs I used, used a differant number for tabs. Always just let it whatever the program had it set by default to, though after using UE for the longest time now, I like 4.
|