0

I would like to see all the lines starting with '//' in a grey colour (Like comments in an IDE). Can I do this automatically while typing using the autocorrect feature any other feature available in Libre Office Writer?

I tried to use replace in auto-currect options. I was able to replace strings starting with prefix '//' to some predefined text. I don't want to replace the whole text. I just want to format lines that start with '//'. Can I do that?

1 Answer 1

0
  1. Press Ctrl+H
  2. Find what: ^//.*$
  3. Replace with: $0.
  4. Click Format -> Font Effects -> Font Color. Select your color. Click OK
  5. Tick Regular expression.

enter image description here]1

  1. Click Replace All

enter image description here

2
  • Thanks for the answer. This works great!. Can this be done automatically while typing?
    – mig001
    Commented Aug 7, 2021 at 7:55
  • @mig001 Not sure if it can be done while tyoing. Commented Aug 7, 2021 at 8:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .