Copy + Paste multiple lines in gdscript causes compile error

When using GdScript and copy at least 2 lines of code and paste them somewhere else it cannot be compiled anymore due to the error “Used space character for indentation instead of tab as used before in the file”.  If a single line is copied it works. 

Is there a way to fix this or a workaround?

0
8 comments

Hello, Deftig ,

Could you please attach your Rider settings: File | Settings | "Manage Layers" button at the bottom => "Export to File" in the context menu for each layer. Thanks in advance!

0

I did what you said in 2024.3 EAP1 with each of the line appearing in this menu. I also attached a screenshot of the issue where just 2 lines were copied and pasted.

Upload ID: 2024_09_20_9cCKfcpHrsA8avo6xUhsCj

0

Thank you. The problem goes away when I set Settings | Editor | General | Typing Assistance | Auto-format on Paste to Indent and enable Settings | Editor | General | Typing Assistance | Smart indent on enter. Could you please check if these settings affect the behavior on your side?

0

These settings are like this by default but still it does not work for me. When pasting, the formatting messes up. Could it be related to a Windows setting or Windows language? If i paste 2 lines of code, the second line is indended for no reason but that's not the error as you could see on my previous uploaded screenshot, the first line already complains about formatting and there is no way to fix it but to delete it again and type it manually.

0

What do you have in the Tabs and Indents section in Settings | Editor | Code Style | GdScript? Those settings aren't included in the layered settings you've kindly exported before. Does toggling Use tab character help? 

I can't repro with your layered settings, so perhaps you could also share your frontend IDE settings, exported via File | Manage IDE Settings | Export Settings… ?

0

The setting you are mentioning does not exist for me for some reason. I uploaded the export settings here:

Upload ID: 2024_09_20_WxqTRhZq4h6xffPF561sr4

 

0

I can't reproduce this anymore with Rider 2024.2.5 and GdScript plugin version 2.5.7. Could you please update both Rider and the plugin and check if you still observe the same issue?

0

Indeed it works with the GDScript Plugin from IceExplosive but my report was about the build-in Godot Support Plugin. Anyway i will use this plugin for now, thanks :)

0

Please sign in to leave a comment.