Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Keyboard shortcut rearranges all spacing


This question is answered.


Permlink Replies: 4 - Last Post: Jun 1, 2016 12:23 PM Last Post By: Remy Lebeau (Te...
Wayne Loeppky

Posts: 52
Registered: 7/4/02
Keyboard shortcut rearranges all spacing  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 1, 2016 7:26 AM
Using Delphi XE5. This has happened a couple times but cannot figure out which keyboard shortcut does this. All the code is reformatted, puts capitals on various things, takes all the neatly lined up code and rearranges how it feels like making it fit. Very annoying as the code looks like a mess after that.

Does anyone know which shortcut this is or what causes that?

Thanks Wayne
Olivier Sannier

Posts: 424
Registered: 8/26/01
Re: Keyboard shortcut rearranges all spacing
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 1, 2016 7:47 AM   in response to: Wayne Loeppky in response to: Wayne Loeppky
Wayne Loeppky wrote:
Using Delphi XE5. This has happened a couple times but cannot figure out which keyboard shortcut does this. All the code is reformatted, puts capitals on various things, takes all the neatly lined up code and rearranges how it feels like making it fit. Very annoying as the code looks like a mess after that.

Does anyone know which shortcut this is or what causes that?

Thats Ctrl-D refactoring.
Turns out that S is dangerously close to D and some users are triggering
the refactoring when all they want is to save.
Andy's tools have an option to disable the Ctrl-D shortcut.
Wayne Loeppky

Posts: 52
Registered: 7/4/02
Re: Keyboard shortcut rearranges all spacing  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 1, 2016 8:04 AM   in response to: Olivier Sannier in response to: Olivier Sannier
Thanks. That was it. I really need to get that disabled. I just rearranged a 2000 line unit.

Thats Ctrl-D refactoring.
Turns out that S is dangerously close to D and some users are triggering
the refactoring when all they want is to save.
Andy's tools have an option to disable the Ctrl-D shortcut.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Keyboard shortcut rearranges all spacing  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 1, 2016 12:23 PM   in response to: Wayne Loeppky in response to: Wayne Loeppky
Wayne wrote:

Thanks. That was it. I really need to get that disabled. I
just rearranged a 2000 line unit.

But, did you save the changes it made? You could just reload an earlier
version of the file. You do use source control, don't you? If not, at least
the IDE also has its own History feature.

--
Remy Lebeau (TeamB)
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Keyboard shortcut rearranges all spacing  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 1, 2016 12:21 PM   in response to: Olivier Sannier in response to: Olivier Sannier
Olivier wrote:

Thats Ctrl-D refactoring.

Technically, it is actually known as Code Formatting, not Code Refactoring.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02