Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortcut to Indent code in delphi 2007

Is there a way to indent the code in delphi? I have to work on a programm that has thousands of lines of code. In eclipse which i had worked before, i have used CTRL + SHIFT + F to format all code by formatting tabs/whitespaces and also divide code lines in a way that it is visible without horizontal scroll. Is there a way to do the same in delphi?

like image 573
delsql Avatar asked Nov 12 '15 12:11

delsql


2 Answers

There is a way to format the code in the whole unit with indentation.

Menu -> Edit -> Format Source

Menu -> Edit -> Format Source

You can also use Ctrl + K + I and Ctrl + K + U to indent current or selected lines.

like image 198
kot-da-vinci Avatar answered Oct 16 '22 12:10

kot-da-vinci


I assume you are looking for a way to format the code in the whole unit with indentation.

This is not included in the regular IDE. But there is a code formatter contained in an 'experimental' version of the GExperts:

http://blog.dummzeuch.de/experimental-gexperts-version/

like image 36
mjn Avatar answered Oct 16 '22 11:10

mjn