[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    Re: [Quanta] PHP Indenting
From:       John L Vifian <jongleur () liripipe ! net>
Date:       2006-03-15 0:06:18
Message-ID: 200603141606.18320.jongleur () liripipe ! net
[Download RAW message or body]

What I would like, and had pretty close in windows via UltraEdit was something 
that could do something as follows:

Given the following bit of script:

<?php
    $j = 0;
    while($j <50)
    {
        $j++;
        echo $j, "<br>\n";
    }
    
?>

After typing the first { and Enter the line should  indent to here:

<?php
    $j = 0;
    while($j <50)
    {
        |

after typing the } closing and Enter the bracket would  be set to match the 
opening bracket's position.  Thus:

    {
        $j++;
        echo $j, "<br>\n";
        }|

after hitting Enter becomes:

    {
        $j++;
        echo $j, "<br>\n";
    }
    |

I have thought of trying to write a script for an action which would insert an 
opening and closing bracket each on their own lines indented with the same 
amount of space as the current line, and with a line between and the cursor 
set on that line one indent in.  But I have no idea how to get the current 
line (without highlighting it) and how to set the cursor position. 

     while($j <50) & Shift-Ctrl-{

Becomes:

     while($j <50)
    {
        |
    }

I hope this is clear.

Thanks,

John Vifian
_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic