WeeChat – highlight

WeeChat - Highlight

WeeChat is already configured to highlight any text that contain your nickname.

highlight nick

Of course, you can add additional words, limit these ones to a particular buffer, emit a beep, execute a custom command and so on.

How to highlight additional words

To highlight any lines containing the words “security” and/or “update” in any buffer, type :

/set weechat.look.highlight security,update

This will match security, Security, SeCuRiTy and so on. To use the case-sensitive version, type :

/set weechat.look.highlight (?-i)security,(?-i)update

How to highlight a particular pattern

You can also use regex. To highlight questions from users, you can type :

/set weechat.look.highlight_regex .*\bHi\b.*\bplease\b.*

this will highlight any lines containing both Hi and please.

How to limit a highlight to one buffer only

If you want to highlight lines containing the word “security” but only in the #wordpress channel, you must change the highlight_words property of the corresponding buffer. To change a buffer property, you must use the /buffer command.

/buffer #wordpress
/buffer set highlight_words security

Now, if someone write “security“, the text should be highlighted. However, you will loose your changes as soon as you leave the channel. You cannot permanently change properties’ value with the /buffer command. You must install the buffer_autoset.py script. Then, the /autosetbuffer command will be created :

/script install buffer_autoset.py

then type :

/autosetbuffer add irc.freenode.#wordpress highlight_words security

How to get a beep

Install the beep.pl script. It is already configured to beep on highlight :

/script install beep.pl

How to get a highlight window

You need the highmon.pl script. Then split your screen :

/script install highmon.pl
/set plugins.var.perl.highmon.alignment "nchannel"
/window splith 15
/buffer highmon



2 thoughts on “WeeChat – highlight

  1. Hello thanks for the info. I followed these instructions but I can’t seem to get buffer_autoset.py script to work. The script installed fine but when I attempt to use ‘autosetbuffer’ i get the following error “script: script “script: script “Error: unknown command “autosetbuffer” (type /help for help)”. My weechat client is ver 0.4.2. Was wondering if you know why that command is not working for me?

    • Hi zaro,

      sorry for the late reply

      In the buffer_autoset.py script we can read that the script require weechat 1.0.
      If you use debian stable, you can still use the latest version of weechat https://weechat.org/download/debian/ (use the one for debian stable)
      I really really recommend to you to use at least version 1.0 to benefit from the awesome trigger and exec plugins.

Leave a Reply

Your email address will not be published. Required fields are marked *