# KSP Editor Questions



## masonroza (May 14, 2011)

Hi Everyone,

Long time read of this incredible forum but first time poster. I had a couple of questions regarding the amazing editor by Nils. 

1. Is there a way that it does not strip comments on the compiled code? or remove all spaces for that matter?

2. By pressing F10 (view as HTML) it opens my browser but everything is pasted in one really long horizontal line. Is there a setting I am missing?

3. When declaring constant variables with names the compiled code has removed the name and replaced it with the actual value. Is there a way that it does not do that?

4. In OS X, when I paste long scripts it takes a long time to do a syntax highlighting and folding, is there a reason for that? Does anyone else have experienced something similar?

Thanks for your answers everyone I cannot imaging KSP scripting without the help of the people in this forum or Nils editor.


----------



## masonroza (May 14, 2011)

Big Bob @ Sat May 14 said:


> > 1. Is there a way that it does not strip comments on the compiled code? or remove all spaces for that matter?
> >
> > In settings, turn off Compact output.
> 
> ...



Works great on PC. Even with folding on a large script it takes 20-30 secs compared to 5-10 minutes in OS X... I know its not a CPU issue cause I'm testing it on a 4+ year old WinXP PC laptop versus a recent Intel 10.5.8 iMac...

Any ideas?

Thanks!


----------



## EvilDragon (May 15, 2011)

masonroza @ 15.5.2011 said:


> Hmmm, it keeps the layout with spaces but comments are still stripped. Same on PC as on a Mac...



Turn off Extra syntax checks


----------



## masonroza (May 15, 2011)

EvilDragon @ Sun May 15 said:


> masonroza @ 15.5.2011 said:
> 
> 
> > Hmmm, it keeps the layout with spaces but comments are still stripped. Same on PC as on a Mac...
> ...



Aha, that did it! Thanks Ev.D!

Still no luck with the html export though, or the slow syntax highlight... Any OsX KSE users out there?

Thanks.


----------



## Mike Greene (May 15, 2011)

masonroza @ Sun May 15 said:


> Still no luck with the html export though, or the slow syntax highlight... Any OsX KSE users out there?


I'm a Mac user, so I tried the HTML view and got the same thing as you: the code is all on one line. I have no ideas on this, though, because it isn't something I ever do. In fact, this was not only my first time doing HTML view, it will probably also be my last. :mrgreen: 

I haven't had an issue with slow syntax checking (or highlighting.) It's reasonably fast (under 5 or 10 seconds) for me on 2,000 line scripts with what I suppose is a "medium" amount of functions. To be clear, what I'm talking about is hitting F5 to compile. If you mean something else, then ignore this.


----------



## Mike Greene (May 15, 2011)

Oh, I see what you're talking about. I do have that happen sometimes. Generally when I've compiled a script, pasted it into Kontakt, and then forget that this entire compiled script is now what's in my clipboard. So when go back to Nils' Script Editor and I _think_ my clipboard just has some single line of code that I copied a few minutes earlier, when I hit Apple-V, instead of pasting in a line or two, it tries to paste in 2,000 lines of code. Oops.

I get that 0% to 100% thing over and over. Since I didn't really want this anyway, I just force quit and pick up where I left off. FWIW, I didn't know the 0% to 100% over and over would ever stop! I just assumed it had ® î


----------



## masonroza (May 15, 2011)

Mike Greene @ Sun May 15 said:


> Oh, I see what you're talking about. I do have that happen sometimes. Generally when I've compiled a script, pasted it into Kontakt, and then forget that this entire compiled script is now what's in my clipboard. So when go back to Nils' Script Editor and I _think_ my clipboard just has some single line of code that I copied a few minutes earlier, when I hit Apple-V, instead of pasting in a line or two, it tries to paste in 2,000 lines of code. Oops.
> 
> I get that 0% to 100% thing over and over. Since I didn't really want this anyway, I just force quit and pick up where I left off. FWIW, I didn't know the 0% to 100% over and over would ever stop! I just assumed it had crashed.



Hmmmm,

Thanks for checking Mike,

At least I know it's an "OS thing" instead of "my system thing", not sure which is better . Oh well, the pros of using the KSE are far more than these cons and being free I can't possibly ask for these things to be fixed. I know that the OS X version is ported by someone else so maybe in the next version of the editor Nils could be nice enough to ask his Mac porter for these little bugs to be checked 

Thanks


----------



## masonroza (Jun 19, 2011)

Hello everyone,

Seems like the same problem exists when saving the file on the disk (inside the Resources/Scripts folder) and then pointing Kontakt's editor to link to that file...
All text comes in one long horizontal line and of course it's not compiling.

Also how would the pragma directive would work in OS X? That might not be broken

Has anyone using these features in OS X? What would be the path? Nils website has the path for the PC but can't figure out the path on the mac...

Cheers,
Mason


----------



## paoling (Jun 22, 2011)

Another thing that should be included is the support of 9######h for Hexadecimal values. A simple workaround is to find the calculate the correct decimal value, but since it's supported in Kontakt, it could be featured in Nils' Editor as well.


----------



## Big Bob (Jun 22, 2011)

Are you aware that the KSE does allow hex numbers but in C-style? ie you can write something like 0xFF and the KSE will translate it into 255. Or do you specifically also require the 0FFh syntax for some reason?

Rejoice,

Bob


----------



## paoling (Jun 22, 2011)

Oh, thank you BB. I missed this feature in the extended synatax list  Thank you so much 

Paolo


----------

