Changes between Version 8 and Version 9 of Features/Brackets


Ignore:
Timestamp:
Apr 25, 2011, 3:35:45 PM (3 years ago)
Author:
bowtie
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Features/Brackets

    v8 v9  
    11[[PageOutline(2-4)]] 
    22{{{PadreWikiFeaturesBrackets Draft}}} 
    3 = Bracket or brace matching and completion = 
     3== Bracket or brace matching and completion 
    44 
    55When the cursor reaches an opening or closing brace { }, square bracket [ ] 
    66or parentheses ( ), Padre automatically highlight the pair of the braces. 
    7  
    8 TO DO make this optional, let the user set the color 
    9  
    107 
    118 
     
    3229use strict; # This will be discussed later 
    3330use warnings; 
    34 ### added [ 
     31### line 7 added [ 
    3532my [( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = localtime( time() ); 
    3633 
     
    3835 
    3936elsif {( $hour == 12 ) { print "Out for lunch...\n"; }} ### added {} 
    40 elsif ( $hour <= 18 ) { print "Hello world!\n"; }]  ### added ] 
     37elsif ( $hour <= 18 ) { print "Hello world!\n"; }]  ### line 13 added ] 
    4138elsif (( $hour < 23 )  { print "Good night.\n"; })  ### added () 
    4239 
     
    4643run against Padre {{{r14200}}} 
    4744 
    48 //Opps should have run the Syntax Checker first// 
     45//Opps should have run the Syntax Checker first, or should I// 
    4946---- 
    5047* the editor appears to highlight matching braces in luminous green :) 
     
    5451 * If the cursor is inside a //brace//, it matches to the inside of it's pair. either forward or backwards :) 
    5552Q, why is this on the menu and not just a keyboard shortcut! 
    56 === Edit -> Select To Brace Matching (//brace//) 
     53=== Edit -> Select To Brace Matching (//brace//) Ctrl+4 
    5754* Cool :) 
    5855* Inside outside matching //braces// as above, and highlights selection for you :) 
     
    6057 * X11 copy don't work 
    6158 
    62 === the above actions also work with "line 7 added [" & "line 13 added ]" hence you are treating //brace// behind a # comment as active ;-(( 
     59**NB** the above actions also work with "line 7 added [" & "line 13 added ]" hence we are treating //brace// behind a # comment as active ;-(( 
     60---- 
     61=== Perl -> Find Unmatched Brace (//brace//) 
     62* Checkes for a lone single //brace// 
     63* appears to work, but in following code in stead of highlighting **}**#odd brace not found, highlights my **[**( $sec on the preceding line. 
    6364 
    64 ----   
     65{{{#!perl 
     66#!/usr/bin/perl 
     67# based on 03_Good_Morning.pl 
     68# This file assumes that you already read (and understood) earlier sessions! 
    6569 
     70use strict; # This will be discussed later 
     71use warnings; 
     72### line 7 added [ 
     73my [( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = localtime( time() ); 
     74} #odd brace not found 
     75if ( $hour < 10 ) { print "Good morning!\n"; } 
    6676 
     77elsif {( $hour == 12 ) { print "Out for lunch...\n"; }} ### added {} 
     78elsif ( $hour <= 18 ) { print "Hello world!\n"; }]  ### line 13 added ] 
     79elsif (( $hour < 23 )  { print "Good night.\n"; })  ### added () 
    6780 
     81else { print "sleep well!\n;" } 
     82}}} 
     83 
     84* **Q** are we are using more than one algorithm to do //brace// 
     85---- 
     86=== Tools -> Preferences -> Behaviour 
     87* the image below shows a composite of the pertinent information. 
     88[[Image(prefs_braces.png)]] \\ 
     89==== Auto-complete Brackets 
     90* When checked, if you type an opening //brace// or String Literal, you get the closing inserted immediately after for you. 
     91==== Add another closing bracket 
     92* appears to be superfluous 
     93---- 
    6894== Tickets 
    6995 
    7096[[TicketQuery(component=Brackets,order=id,desc=1,format=table,col=resolution|summary|owner|reporter)]] 
    7197 
    72  
    73  
     98== TO DO  
     99* make this optional, let the user set the colour