Script Editor - Semantic Highlighting and Temporary Tabs are now in Beta!

Hi Developers!

We’ve got some awesome new Script Editor features and quality of life improvements we want to tell you about! If you would like to use these features please go to File > Beta Features > Script Editor Beta Features and check the box!

Semantic Highlighting

We’re super excited to release Semantic Highlighting into Beta which is an extension of Syntax Highlighting. This update will make it easier to read your code by introducing more granular highlighting for new categories. The Color Presets have also been updated to reflect more detailed highlighting and they can be changed by going to Studio Settings > Studio > Script Editor Colors > Script Editor Color Preset. To turn on this Beta feature go to Beta Features > Script Editor Beta Features.

New Dark Themes :sunglasses:

New Light Themes :sparkles:

We also wanted to share that our future plans also include:

  • Adding High Contrast and Color Blind friendly Themes for accessibility
  • Fine tuning a few Semantic categories

Temporary Tabs

Gone are the days where every time you open a Script it clutters the view and you spend hours searching for the Script you were initially working on. With this new Beta Feature, Scripts will automatically open in “Preview” mode by default which is indicated through the italics in the Script name. It requires double clicking or editing the Script to make it “Keep it open”. The goal of Temporary Tabs is to make it easier to navigate between Scripts in Studio by opening less Scripts that don’t clutter the view.

A temporary tab will open when you:

  • Single click a Script from the Explorer, Output window, or any other widget
  • Use the Quick Open (Cmd+P) or Filter Function (Option+F) to open a Script
  • Hit a breakpoint during a debug session

A permanent tab will open when you:

  • Double click a Script from the Explorer, Output window, or any other widget
  • Double click on the Temporary Tab
  • Right click on the Temporary Tab and select “Keep Open”

We also wanted to highlight some hotkeys that make it easier to interact with tabs:

  • Closing a tab: Ctrl+W for Windows and Cmd+W for Mac
  • Reopening previous tab: Ctrl+Shift+t for Windows and Cmd+Shift+t for Mac
  • Cycling between tabs based on history: Ctrl+tab for Windows and Ctrl+Space for Mac

Our future plans for this feature include:

  • Adding a hotkey to make a temporary tab permanent
  • Enabling developers to “Pin” tabs which moves their position to the left most view so they are easily accessible at all times

Quality of Life Improvements

We’re excited to add some quality of life improvements that will make development faster in Studio:

  • You can delete the current line by using Ctrl+Shift+K for Windows and Cmd+Shift+K for Mac

  • If you’re typing in the Script Editor, Ctrl/Cmd+9 will go to the Command Bar, pressing Ctrl/Cmd+9 again will go back to where you were typing in the Script Editor

  • The overscroll feature allows you to scroll past the last line of your Script by default, if you would like to turn this feature off you can do so by unchecking Studio Settings → Studio → Script Editor → Scroll Past Last Line

  • Theme Presets now link all the colors in the Script Editor so any change you make for a specific theme will only be saved for that theme

  • You can now highlight the current Script in the Explorer by using Ctrl+Alt+K for Windows and Cmd+Option+K for Mac

We’re also working to add:

  • Support to expand selection of a word/token in the Script Editor using Cmd+D
  • Having the Quick Open (Cmd+P) supports 3D objects. Meaning any search for a Model or a Part will open the 3D view and focus on that Object (Need to confirm flag)
  • Having the Quick Open support the “Go to Line” functionality by typing “:” or using the Ctrl/Cmd+G hotkey

All these awesome features are made possible by our awesome engineers: @swmaniac @yohooyohoo @HugoBLH @windy0724 @PaintedGardener @cruiser_forever

We would love to hear any questions and feedback down in the comments below!

316 Likes

This topic was automatically opened after 14 minutes.

In all the examples type is always highlighted as a keyword even though in some contexts it is used as a function or it gets assigned to nil. In these cases it would be an identifier. Will the script editor be able to account for cases like this?

20 Likes

Ahhhh! New light themes you say?

Nice-looking dark themes. :slight_smile:

I am really glad to hear that Roblox is planning to add high contrast and color-blind friendly themes.

Also, for the hotkey you plan to add to make a temporary tab permanent, this can be disabled right?

13 Likes

This is neat! I’m gonna have to test out the temporary tab feature - and I hope that it won’t interrupt my workflow. I can imagine it potentially getting in my way when I’m trying to edit something and it magically disappears on me.

Other than that, great work! Happy to see some love and attention to the script editor.

6 Likes

We really need better autocomplete for coefficients sake. (I didn’t want to say the F word)
Just look at Lua LSP (that autocomplete suggestion won’t show up in Roblox Studio):
image

Better Luau support would also be hot.

55 Likes

God. Pleaseee tell me we will be able to bring the old colors back. I don’t like the for example yellow nil, blue properties. Over-all except the colors the update seems great!

16 Likes

Omg yes! Finally. I’ve been waiting for some of these features for ages! The added shortcuts are will definitely increase my workflow. Thank you for this!

6 Likes

I don’t have much to say except: thank you RIDE team, very cool! Keep it up.

Any chance we could get a shortcut to duplicate a line/whatever we have selected?

Also, since someone will inevitably request it: is there a setting to disable the temporary tabs, and if not, can one be added?

18 Likes

Every color you see here is configurable under Studio settings and will update live.

17 Likes

Ah, thanks for the info. I’ll surely bring back the old colors. But the update is great!

5 Likes

Right now? No (for performance reasons, we do not have this information during syntax highlighting). If there’s interest we can do a third pass on this.

7 Likes

Will there ever be a direct integration with VSCode, or something like Rojo as a built-in feature?

5 Likes

This looks awesome! One question though, how many of these new features are configurable? Specifically, the permanent/temporary tab system. I got mixed feelings from Visual Studio about it, not sure if I’ll use it in Studio but I’ll give it a shot.

1 Like

Will we be able to turn off the Temporary Tabs feature? I can see how this can be useful, but many of us are already used to the old way and it could interrupt our workflow.

12 Likes

Super happy with the improvements the script editor is seeing lately.

Can second the duplicate hotkey. I use it pretty often in other text editors.

Also, I’m not really a fan of the temporary script editor window that opens when you click on a script in the explorer. Can there be a way to disable this? This feels like it would turn scripts into landmines to avoid for me, especially since I need to manually click back into the viewport after opening one, and it seems likely that I will just be selecting scripts in the explorer (either intentionally or accidentally while aiming for the Expand caret) with the intention to cursor through the hierarchy under them or move them, rather than to simply peek into them (which seems like the intention of this feature). I’m a frequent clicker and this would really get in my way. With the way I work, I find I don’t typically need to reference more than 2-3 other scripts at once, so this feature really doesn’t seem worth it for me.

At the very least, if I click into the explorer while viewing a temporary script, then Studio should return to the viewport tab.

18 Likes

The single click affects my ability to select the script I intend to use shortcuts on. For example, if you single click on a script you want to delete the previous behavior all I had to do is single click and hit the delete key. Now, it will delete the contents in the script. This includes copying and pasting and other shortcuts.

7 Likes

Also, when will there be added support to do Ctrl+S to commit the current script? I’ve been waiting for a future like this for a while too.

1 Like

In the examples shown I see method calls being highlighted, but for me they don’t highlight.
image

It looks like functions calls done without parenthesis don’t get highlighted
image

5 Likes

Just curious, and if it can be shared, what are the performance implications for doing this? I think it is important that this is differentiated during highlighting so it is less confusing when coding.