Jump to content
Developer Wiki and Function Reference Links ×

Editing a Script?


Recommended Posts

How come when I click on Edit Script all of my code has all the spaces, returns, and indentations removed!? if I try to recompile it gives me errors!

I then have to delete everything and re-paste it all into the script editor. How do I get the script editor to not remove my spaces, returns, and indentations?

Link to comment

I conducted a short test. One script I copy and pasted from a text editor. The second script I typed the same code directly into the script editor.

After compiling and trying to edit, I have noticed that the script that was copy and pasted removed all spaces, returns, and indentations.

The script that was typed directly into the script editor retained all spaces, returns, and indentations.

Does this mean I have to type all of my scripts directly into the script editor!?

Link to comment

I think it depends on what format the text editor is using.

I don't think the VS Editor is Unicode Aware. That means that if you use something like Word as your editor, it is not using the standard codes for some characters and therefore you are losing the formatting.

If you use a programmers editor like TextWrangler (Free), BBEdit or MarsEdit, you should be able to copy and paste the data.

The other option is to just {$INCLUDE} the data from the text file into the script and only use the VS Editor for the INCLUDE line.

Link to comment

VSO files include some binary data so they can't be edited directly except using the Vectorscript Plug-in Editor.

What you can do is Use the PIO editor and copy/paste the text into the external editor. Then change the script in the PIO to use an {$INCLUDE} statement linking to the external file. See the Vectorscript Reference section on Compiler Directives for more information.

Link to comment

Thx again.

I tried some files and it goes ok, except for the folding/unfolding of code blocks. It seems unpossible to get this right because everything in VectorScript ends with END;! So setting up this feature in one of the editors fails with code from Vectorscript, or am I missing something?

So the only thing I get is syntax highlighting. I think I'm going to stick with the VS editor because the only thing I want is the (un)folding.

Link to comment
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...