Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 12-30-2005, 08:21 PM
burndata burndata is offline
Senior Member
 
Join Date: Aug 2005
Posts: 210
Default Space Structure Selected Code in IDE?

Lets say you write a procdure like so:

procedure MyProcess(Data:String);
var
sMyData : String;
begin
sMyData := Data;
if sMyData = 'Start' then
begin
StartProcess;
end
else
StopProcess;
end;

is there is helper tool so that in the IDE you can just select the text right click and hit a hotkey and then the text turns into:

procedure MyProcess(Data:String);
var
sMyData : String;
begin
sMyData := Data;
if sMyData = 'Start' then
begin
StartProcess;
end
else
StopProcess;
end;

15 years ago I have used formating tools back in the old pascal days.... but I have yet to see anything in the IDE as of yet.. and I am in D2006.... any suggestions? Sometimes I get lazy and I just type and don't space until later....

lenn.
Reply With Quote
  #2  
Old 12-30-2005, 08:23 PM
burndata burndata is offline
Senior Member
 
Join Date: Aug 2005
Posts: 210
Default RE: Space Structure Selected Code in IDE?

i can't believe I didn't even restructure my homemade message code properly.. you should see what I am trying to do..I like nice to have my blocks of code all spaced right....
Reply With Quote
  #3  
Old 12-30-2005, 08:29 PM
gLes gLes is offline
Senior Member
 
Join Date: Jan 2001
Posts: 2,273
Default RE: Space Structure Selected Code in IDE?

Well, I don't know of anything fully automatic feature built-in the Delphi (7) IDE, but the Editor has such options like Autoindent mode which might ease your laziness

You can also use the Ctrl+Shift+I and Ctrl+Shift+U to Indent and Unindent a selected block of code

Ofcourse there exist certain 3rd party software, usually shareware for such tasks

[link]http://www.google.com/search?q=delphi+source+formatting+wizard[/link]

gLes
Reply With Quote
  #4  
Old 12-30-2005, 11:51 PM
burndata burndata is offline
Senior Member
 
Join Date: Aug 2005
Posts: 210
Default RE: Space Structure Selected Code in IDE?

nice.. I just tired the Indent/Unindent.. I like it.. but some more options would be good... like a "Smart AutoIndent"

then my question gets transfered in how would I go about making a BDS2006 PlugIn.
Reply With Quote
  #5  
Old 01-01-2006, 04:03 AM
TheCaptain TheCaptain is offline
Senior Member
 
Join Date: Dec 2005
Posts: 194
Default RE: Space Structure Selected Code in IDE?

Did you also know that you can work in colums by holding alt and shift and then cursor up and down to select vertical text. This lets you format vertical blocks of code at once.

You can use ctrl-k to vertical block indent and delete to remove vertical spaces.





The Captain

Reply With Quote
  #6  
Old 01-01-2006, 04:28 PM
burndata burndata is offline
Senior Member
 
Join Date: Aug 2005
Posts: 210
Default RE: Space Structure Selected Code in IDE?

excellent.. I have been copying my source into UltraEdit and then switching to Collum mode in UE and doing big code alterations there..... I will try to get comfortable with the built in Collum editing... I can't remember knowing that COl Editing was possible in D7.
Reply With Quote
  #7  
Old 01-03-2006, 05:57 AM
MrBaseball34 MrBaseball34 is offline
Senior Member
 
Join Date: Jan 2001
Posts: 7,260
Default RE: Space Structure Selected Code in IDE?

Use DelpForEx expert.
http://www.dow.wau.nl/aew/delforexp.html

You can setup your own templates and have the code formatted
like you want.


MrBaseball34
Hook'Em Horns!
Reply With Quote
  #8  
Old 01-03-2006, 03:26 PM
burndata burndata is offline
Senior Member
 
Join Date: Aug 2005
Posts: 210
Default RE: Space Structure Selected Code in IDE?

This is exactly what I was looking for.. a inline IDE spacing tool for D2006.

lenn.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 12:04 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.