Fix Indentions on Braces

Syntax highlighting, code folding, brace matching, code indenting, and function list

Fix Indentions on Braces

Postby barkster » Mon Jul 10, 2006 8:03 pm

Will UE fix indentation errors in a php doc? I've been unable to find a way to make it fix(cleanup) an existing document. For instance:

Code: Select all
if($color == 'blue') {
if($today == 'monday') {
//do something
}
else {
//do nothing
}
}


result

Code: Select all
if($color == 'blue') {
    if($today == 'monday') {
         //do something
    } else {
        //do nothing
    }
}
User avatar
barkster
Newbie
 
Posts: 1
Joined: Sun Jul 09, 2006 11:00 pm

Re: Fix Indentions on Braces

Postby Mofi » Tue Jul 11, 2006 3:55 pm

The ReIndent Selection feature works with the settings

/Indent Strings =
/Unindent Strings =

in your syntax highlighting wordfile for the current language (PHP for a PHP section, HTML for a HTML section, ...). So it mainly depends on you and your Indent/Unindent Strings how good or bad it works. But some code blocks (like my 'C' code with multiple } in the same line) cannot be correctly reindented.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4042
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Syntax Highlighting

cron