acemod / language-arma-atom

Atom language support for Real Virtuality file formats
https://atom.io/packages/language-arma-atom
MIT License
33 stars 16 forks source link

Much code in one String doesn't show properly #57

Closed unknownp closed 8 years ago

unknownp commented 8 years ago

Hey, If I use this on an Arma script that has for example a big string like:

_bigstring = " much here, like 100 lines or more "; call compile _bigstring;

then you would see everything just in "green" as it is all part of "that" string :-/

jokoho48 commented 8 years ago

i am not 100% sure but this can be a issue from Atom. i rember see this in C# and c++ and CS Code too

unknownp commented 8 years ago

mhh that might be true. Atom pretty much remembers me of Sublime, not sure why but it does. Well on Sublime I experienced the same problem

thojkooi commented 8 years ago

That's because it's a string. Why is this an issue? Or am I misunderstanding it here?

jonpas commented 8 years ago

Code in a string won't be highlighted as code pieces, but as one big string, is this not expected behaviour?

unknownp commented 8 years ago

Well in other programs like notepad++ or programmer's notepad it is not like that You would only have the line where the string opens highlighted and where it ends

_test = " <- this line

much code within a string

"; <- and this line

that way you can see as well from where to where the string goes but you also have good highlights on what's happening within

kymckay commented 8 years ago

First off I would simply recommend not having 100 lines of code in the form of a string :stuck_out_tongue:

Secondly, isn't this default behaviour in most text editors? I feel like last time I used N++ it behaved this way. Not sure there's even anything we can do about it, sounds more like a complaint with regard to Atom.

unknownp commented 8 years ago

Well in arma strings use way less memory than for example code. Especially when it comes to networking in arma, sending code from client to server, server to client or client to client it makes a huge difference if you do that as a String (string is just much faster, even if you have to call compile it afterwards) or as Array, Scalar, Code

on N++ it is fine, I just wish it was like it is there, on this. As ATOM really seems to be nice :)

thojkooi commented 8 years ago

I do not consider this a bug, sorry.

jonpas commented 8 years ago

Same, it's expected behaviour (it even works like that in Visual Studio IIRC). Marking as invalid, if you'd like different behaviour it is something Atom itself has to do.