[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ww-tedit-dev] idea about extending the brackets highlighting
From: |
petar marinov |
Subject: |
Re: [ww-tedit-dev] idea about extending the brackets highlighting |
Date: |
Tue, 16 Dec 2003 13:13:50 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031015 Debian/1.4-0jds2 |
Tzvetan Mikov wrote:
Pondering on this problem I think it is a good idea when a '{}' pair is
highlighted to put in bold the 'if/for/while' statement (the reserved
word itself) to which the block belongs.
I think that is an excellent idea.
Good, now I'm motivated to work on it.
Something else to think about: if there is a closing bracket whose opening
bracket is outside of the screen, it would be useful if we could in someway
display what is the controlling statement. I think an example will help to make
this clearer:
for ( i = 0; i != 10; ++i )
{
... many lines ...
... this is a different screen:
}
When I highlight the closing bracket I would like in some way to see that it
belongs to a "for" loop, or even better then entire "for" expression.
I imagine it this way: When the cursor is on the closing curly bracket,
on the status line, in an inobtrusive way, the line of "for ( i = 0;
..." will appear. Cursor moves away from '}' and the usual status line
is restored. This will very helpfull in the case of multiple closing
brackets when it takes you quite some time to figure what is closing
what block, with this feature it will be a matter of just walking the
brackets with the cursor.
Alternative way of showing the "for" line is next to the '}'. When the
cursor is on top of '}', next to it in a monocolor the contents of the
for line is displayed.
Another alternative way. We introduce a *tooltip* feature, this will
allow us to display various information not only now but for similar
purposes in the future.
All this will be quite fast because we keep tabs of the brackets nest
level for all the lines in the .c file.
-tz
P.S. Which is the correct word to use in this context: bracket, brace or
parentheses ?
"Parentheses" is plain hard to spell.
bracket = '{', or curly bracket
parentheses = '('
brace, mabye = '[' or square bracket
-petar