-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create UnrealScript.tmLanguage #1
Conversation
A more fleshed out version of an UnrealScript syntax highlighter for Sublime. Based on keywords from DougClayton4231's syntax highlighter for Notepad++. http://forums.epicgames.com/threads/894604-New-Unrealscript-Highlighter-For-Notepad
Hey really cool. If you could update it a little, I'd really like to include the file as it would make the setup to get a good UnrealScript IDE even easier. Also the guy who did the one I'm currently using doesn't seem to be interested in it anymore.. |
also, how about making the math symbols red, like it is done in other syntax highlighters? |
oh and just to inform you I won't be able to reply back for 1 or 2 weeks, as I'm going away on holidays right now. |
Awesome. Yeah, I can definitely add those keywords. The more the better. As far as the colors I don't think they can be defined in the tmLanguage file itself. I think that's taken care of by the theme you are using. I'm pretty sure I know what color you're talking about. Kind of a godawful bright pinkish color right? I had to change that myself. You can change it by opening Preferences > Browse Packages > Color Scheme - Default > Monokai.tmTheme around lines 122 and 135. We could also just designate that color for the section with the least amount of keywords. And yeah, I noticed this plugin was only a few days old lol. Really glad I found it. It totally rocks, man. Enjoy the holiday! |
Added keywords: reliable, server, exec, self.
Added: Instigator, foreach
Added: Begin, End
Added: sleep, GotoState, Goto
Great to see you added some more keywords! |
maybe have a look at the the file from here: thats the one I'm currently using. |
Why is Vector, Rotator, etc added? They are not keywords but only defined structs within object.uc, imo they shouldn't be highlighted unless you are going to add struct declaration detection and as follows highlight every struct similar to Resharper syntax highlighting! |
switched the group starting with class with the group starting with abstract.
Ok, I switched some groups around. See if that is any better. Another possibility is to add a tmTheme file to the package. It would be found under Preferences > Color Scheme > UnrealScript. |
@EliotVU Several "keywords" in the file are not keywords at all. However, I like the fact they are highlighted because they are used so much. SoundCue is technically not a keyword either. It is ultimately up to Zinggi whether or not he wants to use the file which has not been pulled yet. The file he is using now is probably the purist as far as keywords go. |
Okay, thought so. It would definitely be nice if those are detected by the parser as class instead, similar to that of C# where each var declaration highlights the data type as lightblue if that data type is an object reference. Btw: I have highlighted every possible keyword of UnrealScript for my program UE Explorer, feel free copy the keywords: http://pastebin.com/ZpqXQNBK |
So I've tried your newest file and it does really recognize way more keywords than the one from https://github.com/beefsack. @EliotVU You mean the C# syntax file in sublime? I don't know how it's done, but don't you think it just contains a list of all standard objects? |
ahh, I don't know how this works! I've never used github before. It says "This pull request cannot be automatically merged." Do you know what to do? |
Alright, I figured it out, thanks again! |
I actually spent some time trying to figure out how operators were highlighted. Opened up a few questions on the Sublime forum and Stackoverflow and never got a response. I seriously have no idea how it's done, but if I ever figure it out I'll let you know. |
Alright, it's not really a thing, it would just be a nice-to-have. |
@Zinggi No, I'm talking about the C# highlighting in Visual Studio, it does detect whether something is an object and will highlight it lightblue if so. |
Ah I thought you meant a Sublime plugin which would have been great. What a pity, this probably means that sublime is not capable of doing that and therefore we can only add some standard classes as "keywords" to mimic that. |
I created a more fleshed out version of an UnrealScript syntax highlighter for Sublime. Based on keywords from DougClayton4231's syntax highlighter for Notepad++.
http://forums.epicgames.com/threads/894604-New-Unrealscript-Highlighter-For-Notepad