Trim additional indentation when pasting?

Answered

File 1 Code:

               var stuff = new List<string>();

                var newStuff = new List<otherStuff>();

File 2 Code:

               var fileStuff = new List<FileInfo>();

 

If I copy a line from File 2 and paste it below the code in File 1 I get the following:

 

               var stuff = new List<string>();

                var newStuff = new List<otherStuff>();

                             var fileStuff = new List<FileInfo>();

 

Where the copied line does not meet up with the closest indent but keeps all existing indentation when copied. How do you change this so that on paste the indentation lines up? 

2 comments
Comment actions Permalink

Hy Ryan! 

Please, check the `File | Settings | Editor | General | Typing Assistance | Auto-format on paste` setting. Try to select "Indent". 

I hope this help! 

1

Please sign in to leave a comment.