IDE question: Automatic indentation upon paste

mokrokuce

Member
Licensed User
Longtime User
Hi,
Not sure this is the right place, I vaguely remember there was "IDE" forum or thread somewhere, but can't find it now.
Anyway,
I am using B4A 7.8, and I hate this "automatic indentation after paste" feature and would like to turn it off.

It works like this: I have existing code:
B4X:
Private Sub CopyFolder(Source As String, targetFolder As String)
   If File.Exists(targetFolder, "") = False Then File.MakeDir(targetFolder, "")
   For Each f As String In File.ListFiles(Source)
     If File.IsDirectory(Source, f) Then
       CopyFolder(File.Combine(Source, f), File.Combine(targetFolder, f))
       Continue
     End If
     File.Copy(Source, f, targetFolder, f)
   Next
   Log("Some other code line")
End Sub
...and then I select line 10 and copy and paste it somewhere inside "if" (at line 6) and IDE automatically indents all the lines (6,7,8), so my code now looks like this:
B4X:
Private Sub CopyFolder(Source As String, targetFolder As String)
   If File.Exists(targetFolder, "") = False Then File.MakeDir(targetFolder, "")
   For Each f As String In File.ListFiles(Source)
     If File.IsDirectory(Source, f) Then
       CopyFolder(File.Combine(Source, f), File.Combine(targetFolder, f))
            Continue
            Log("Some other code line")
        End If
     File.Copy(Source, f, targetFolder, f)
   Next
   Log("Some other code line")
End Sub
I can, however, press "ctrl+z" immediately after paste, and IDE will lose the indentation, but this annoys me. Is there a way to turn it off?
 

mokrokuce

Member
Licensed User
Longtime User
Just like always, I find answer myself after seeking help. There is "Tools->IDE options->Auto format when pasting" menu that turns this feature on/off.
Maybe someone else finds this helpfull.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…