Jump to content


Photo

Word wrap not working in code editor


  • Please log in to reply
8 replies to this topic

#1 gmcsdobbie

gmcsdobbie

    GMC Member

  • GMC Member
  • 298 posts

Posted 09 June 2012 - 10:19 PM

I have a large amount of data that I am copying from a text document into the code editor. When I copy it, it just appears as one long line of text and half of what I copied is missing as one line can only be so long. How do I copy the text with formatting?
  • 0

#2 Mike.Dailly

Mike.Dailly

    Evil YoYo Games Employee

  • Administrators
  • 1483 posts
  • Version:GM:Studio

Posted 11 June 2012 - 06:42 PM

There is no line wrap in the code editor. Code should never auto-wrap as it can easily confuse things and introduce bugs.

And if there was one....I'd take it out :biggrin:
  • 2

#3 gmcsdobbie

gmcsdobbie

    GMC Member

  • GMC Member
  • 298 posts

Posted 13 June 2012 - 02:20 PM

There is no line wrap in the code editor. Code should never auto-wrap as it can easily confuse things and introduce bugs.

And if there was one....I'd take it out :biggrin:


Personally, I would say that one giant long line of text is far more confusing than a neat indented program.
  • 0

#4 Mike.Dailly

Mike.Dailly

    Evil YoYo Games Employee

  • Administrators
  • 1483 posts
  • Version:GM:Studio

Posted 16 June 2012 - 12:16 PM

Splitting a line of text yourself where it makes sense to do so is fine! But having automatic "word wrap" is a terrible idea in code!
  • 0

#5 Jobo

Jobo

    No neurons left today

  • GMC Member
  • 2404 posts
  • Version:GM:Studio

Posted 16 June 2012 - 03:19 PM

Personally, I would say that one giant long line of text is far more confusing than a neat indented program.

When you write your code, will you ever write an entire script out in 1 line?
If you will, I suggest you start watching some programming tutorials.

Pasting into a document is a far different thing.
As Mike said, split it yourself.

Word-wrap = software specific, not a "global" concept.
  • 0

#6 gmcsdobbie

gmcsdobbie

    GMC Member

  • GMC Member
  • 298 posts

Posted 16 June 2012 - 08:05 PM

Personally, I would say that one giant long line of text is far more confusing than a neat indented program.

When you write your code, will you ever write an entire script out in 1 line?
If you will, I suggest you start watching some programming tutorials.

Pasting into a document is a far different thing.
As Mike said, split it yourself.

Word-wrap = software specific, not a "global" concept.

That is strange because sometimes I have copied large amounts from notepad into the code editor and the formatting is retained, but mostly it is not.
  • 0

#7 Jobo

Jobo

    No neurons left today

  • GMC Member
  • 2404 posts
  • Version:GM:Studio

Posted 16 June 2012 - 09:06 PM

That is strange because sometimes I have copied large amounts from notepad into the code editor and the formatting is retained, but mostly it is not.

That's because that piece of text had been manually formatted.
When it works: manually formatted.
When it fails: word-wrap.
  • 0

#8 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14389 posts
  • Version:GM:Studio

Posted 16 June 2012 - 09:24 PM

I think people may have misread the problem.

Do you have code that originally was formatted and you paste and it is not formatted anymore? Loosing all the line breaks that was there?

It happens some times.

What I do is use Notepad++ (google and go get it) and paste it there. then I tell notepad++ to "menu/Format/Convert to Windows Format". re-copy and paste in GM....
  • 0

#9 gmcsdobbie

gmcsdobbie

    GMC Member

  • GMC Member
  • 298 posts

Posted 17 June 2012 - 01:49 PM

I think people may have misread the problem.

Do you have code that originally was formatted and you paste and it is not formatted anymore? Loosing all the line breaks that was there?

It happens some times.

What I do is use Notepad++ (google and go get it) and paste it there. then I tell notepad++ to "menu/Format/Convert to Windows Format". re-copy and paste in GM....


Thanks very much. That will be a fine replacement to Notepad.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users