Recent

Author Topic: Can't I highlight part of code?  (Read 285 times)

egsuh

  • Hero Member
  • *****
  • Posts: 1715
Can't I highlight part of code?
« on: November 14, 2025, 04:04:29 am »
With no other meaning/functions except highlighting itself, e.g. recently changed, or still developing parts?

Thaddy

  • Hero Member
  • *****
  • Posts: 18529
  • Here stood a man who saw the Elbe and jumped it.
Re: Can't I highlight part of code?
« Reply #1 on: November 14, 2025, 07:02:48 am »
A diff viewer, maybe?
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

cdbc

  • Hero Member
  • *****
  • Posts: 2533
    • http://www.cdbc.dk
Re: Can't I highlight part of code?
« Reply #2 on: November 14, 2025, 07:11:36 am »
Hi
You can try and play with "User defined markup" in 'Editor Options'...
· Right click in any area of the code-editor and choose 'Options'.
See the attached picture...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11932
  • Debugger - SynEdit - and more
    • wiki
Re: Can't I highlight part of code?
« Reply #3 on: November 14, 2025, 08:43:03 am »
With no other meaning/functions except highlighting itself, e.g. recently changed, or still developing parts?

Depends on what kind of "highlight"...

Code that was edited (since the file was loaded, or last saved), is indicated in the gutter (green/yellow on the left side). It does not change the colors inside the actual code.
So in terms of help you see what you currently work on: Its just those yellow/green bits.

But, you can apply your own colors, via keycombo. E.g. if you have a variable called "MyLocalFooValue", then you can highlight that word (it will highlight everywhere in the text, even outside the current proc, but it may still help...)

Or you can highlight the name (or header line) of that function. The header line, i.e. the full "procedure TFoo.MyBar;" is probably unique. So if highlighted it will be easy to spot.

To do such highlights add "User defined Markup"
https://wiki.lazarus.freepascal.org/IDE_Window:_Editor_User_Defined_Words
Make sure you add key-combos.
=> Then select the text, and toggle the markup.


This is how it can look in the editor: https://wiki.lazarus.freepascal.org/New_IDE_features_since#Multiple_user_defined_word_highlight/markup

 

TinyPortal © 2005-2018