Leo's match-brackets command is an essential tool when trying to make sense 
of javascript files.

Here are two tips relating to this command.

1. Bind a keystroke to match-brackets. I use Ctrl-comma. It's too clumsy to 
use Ctrl-P, repeat-complex command.

2. Executing match-brackets *twice* selects a region leaving the cursor 
(insert point) unchanged. This makes creating new sections easy.   For 
example,

<hairy stuff> function(...) {
// who know where it all ends

To create a section for this complex function do the following:

A. Create a section reference before the function:

<< new section >>
<hairy stuff> function(...) {
// who know where it all ends

B. Put the cursor on either side of the curly bracket that start the 
function and do match-brackets twice.  This selects the body of the 
function, leaving the cursor unchanged.

C. Extend the selection to the start of the << new section >> line with 
Shift-Home followed by Shift-Up-Arrow.

D. Create the new section with Shift-Ctrl-D, the 'extract' command.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to