Dont remove the whitespaces for the entire line when pasting text

I have modulescripts with additional whitespaces for some lines to make it easier to see some code/functions.
Whenever i have to change something by pasting a piece of text into :findfirstchild(), it removes the whitespaces from the entire line, rather than leaving it alone and letting me paste the text inside.


If the whitespaces would have been left alone in this situation, it would make my life so much easier as i wont have to press tab multiple times on every single line i change.

3 Likes

Does setting the Script Editor setting “Auto Indent Rule” to “Relative” solve this for you?

3 Likes

Setting it to Relative worked.
Why isn’t Relative auto enabled? I did not even know this existed or this setting was affecting it.

I think there should be some sort of preview case tooltip for the studio settings to prevent confusion in the future.

2 Likes

There are two reasons that we default to Absolute indentation:

  1. We want the Script Editor to be opinionated about the best way to write Roblox Lua. This is defined in the Roblox style guide: Roblox Lua Style guide
  2. We did a fairly large survey of the developer community and absolute indentation was preferred by 2/3 of developers

Good suggestion for improving the settings menu! We will consider how we can make the effect of these settings clearer.

5 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.