Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-03

Smarter Text Highlighter in SynEdit?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Reenen Laurie

(This email doesn't make 100% sense if you read your emails in 100% text -- no formatting)

Hi

I really like the Text Highlighter in SynEdit, although there is a quirk that sometimes gets to me...

In the following code:

procedure loop(t : Tstringlist);
var
  i : integer;
  NewList : TStringlist;
begin
  i := 0;
  NewList := TStringList;
  while i < T.Count -1 do begin
    // some code
   inc(i);
  end;
end;
procedure next;
var
  i : integer;
begin
  i := 0;
  i := i + 1;
end;
If I hover on i (in i := 0), then all the i's are highlight...  TStringLi
st...

Can't it just highlight the i variables? As indicated by the yellow highlighted parts, not the Pink highlighted parts.

Another feature in this cool feature that I'd like... (Which may add more overhead?)... Is that only the variable in it's specified scope is selected...

Ie. The i in the loop procedure gets highlighted, but not the i variable in the next procedure...

Regards,
-Reenen

o__ ,_.>/ _ (_)_\(_)_______ ...speed is good _______________ I believe five out of four people have a problem with fractions. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20090314/1f05bbc1/attachment.html

Reply by email

Martin Friebe
to Reenen Laurie
Reenen Laurie wrote 16 lines
(This email doesn't make 100% sense if you read your emails in 100% text -- no formatting) Hi I really like the Text Highlighter in SynEdit, although there is a quirk that sometimes gets to me... In the following code: procedure loop(t : Tstringlist); var i : integer; NewList : TStringlist; begin i := 0;

....

Show quoted text 6 lines
If I hover on i (in i := 0), then all the i's are highlight... TStringList... Can't it just highlight the i variables? As indicated by the yellow highlighted parts, not the Pink highlighted parts.

As discussed on the chat, but for anyone else who may have the issue. this can be configured:

http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Options#Automatic_features

Best Regards
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20090314/0964c102/attachment.html

Reply by email