Recent

Author Topic: Word Highlight  (Read 5132 times)

LA.Center

  • Full Member
  • ***
  • Posts: 244
    • LA.Center
Word Highlight
« on: September 08, 2011, 09:56:59 am »
Hi everyone,

there is one thing that bugs the hell out of me:
In the Lazarus Editor when you select a word a second later all words that are the same are highlighted (grayish)

My question
a) What is it good for?
b) How can I turn it OFF?

Thx

Bart

  • Hero Member
  • *****
  • Posts: 5288
    • Bart en Mariska's Webstek
Re: Word Highlight
« Reply #1 on: September 08, 2011, 10:26:33 am »
Yes, it is somewhere in Editor options.
Don't know exactly where.

Bart

LA.Center

  • Full Member
  • ***
  • Posts: 244
    • LA.Center
Re: Word Highlight
« Reply #2 on: September 08, 2011, 10:32:12 am »
Found it, its under:

Editor -> Display -> Markup and Matches

and then check mark "Disable Markup for current Word"

have still no idea why it is in there and what it does.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9855
  • Debugger - SynEdit - and more
    • wiki
Re: Word Highlight
« Reply #3 on: September 08, 2011, 11:11:37 am »
Well I find in useful, if I want to quickly see where a word is used. Especially in code with similar identifier names.

And that happens to be it's only purpose. It has no active function. Just a "quick way to search".

It also works for the word-under-caret (if no selection is made)

I don't know it's default color settings thoug. I use a very soft grey background, so it is not to intrusive.

Anyway you found how to switch it off. BTW, that should still leave you Alt-M
pressing Alt-M should mark the current word-under-caret (or current selection) and keep it highlighted, even if the caret moves.
A second Alt-M should switch it off (or to the new word)

-------
BTW, if you hace a better name for the options page "Matches and Markup" then make it known please



LA.Center

  • Full Member
  • ***
  • Posts: 244
    • LA.Center
Re: Word Highlight
« Reply #4 on: September 08, 2011, 11:26:20 am »
ok, I see, I was thinking maybe it is a coder tool that you can use to rename all highlighted text and was trying out all key combinations to make it work.

I would find this a useful feature if for example:

1. I select a word
2. when I press Ctrl+H (could be anything) then I enable word sync
3. when I change the word at the cursor all highlighted words change too
4. and when I move out of word/line the word sync is disabled again.

I will have look at the source of laz a bit, maybe I can come up with this feature and can contribute :)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9855
  • Debugger - SynEdit - and more
    • wiki
Re: Word Highlight
« Reply #5 on: September 08, 2011, 12:09:09 pm »
"Renaming all words"

that is syncro edit, and you can do that: http://wiki.lazarus.freepascal.org/New_IDE_features_since#Syncron-Edit

---
Other powerful stuff the IDE can do: http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools
« Last Edit: September 08, 2011, 12:12:37 pm by Martin_fr »

LA.Center

  • Full Member
  • ***
  • Posts: 244
    • LA.Center
Re: Word Highlight
« Reply #6 on: September 08, 2011, 12:32:03 pm »
Hey thats superb, thx for the info :)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9855
  • Debugger - SynEdit - and more
    • wiki
Re: Word Highlight
« Reply #7 on: September 08, 2011, 12:43:06 pm »
BTW: syncro edit, works on the entire unit too  (ctrl-a for select all)

However, for speed reasons, it only offers the first 50 words (counting only words that have duplicate) for editing.

So if your unit is huge[1], then you might want to find the first occurrence of the word, and select from there to the end of file.

[1] Don't worry, it does not slow down the editor for other work => it was tested on a 300.000 lines file, with select-all (only takes time (a few seconds), if you actually activate it)

 

TinyPortal © 2005-2018