<<< Date Index >>>     <<< Thread Index >>>

Re: *bold* etc.



* Toby <tobia.conforto@xxxxxxxx> :
> 
> Does Mutt have any native option to highlight this kind of *bold*,
> /italic/, and _underline_ oftentimes used on the net?

Not that I'm aware of - regex's I use:

color body brightwhite default "(^|[^[:alnum:]*])+[*]($|[-[:alnum:]])+[*]"  # 
bold
color body brightyellow default 
"(^|[^[:alnum:]])+[/]($|[-[:alnum:]])+[/]+[^[:alnum:]]+" # italics
color body brightcyan default "(^|[^[:alnum:]])+[_]($|[-[:alnum:]])+[_]+"   # 
underline

These are tricky and I'm still tinkering with them - the italics
sometimes highlight dir paths like /usr/local/ and so on.

> What about highlighting URLs and email addresses?

color body brightblue default "(ftp|http|https)://[^ ]+"   # point out URLs
color body brightblue default 
"www\\.[-.a-z0-9]+\\.[a-z][a-z][a-z]?([-_./~a-z0-9]+)?"
color body brightblue default [-a-z_0-9.]+@[-a-z_0-9.]+    # e-mail addresses
 
Others may have better regexes.

> If not, please comment on my efforts:
> 
> color body brightgreen   default '\W\*\w.*\w\*\W|\W_\w.*\w_\W|\W/\w.*\w/\W'
> color body brightmagenta default '\w+://[a-z0-9./%@#?+&=-]+'
> color body brightred     default '[a-z0-9.+-]+@[a-z0-9.-]+\.[a-z]{2,4}'

-- 
Troy Piggins
Ubuntu 5.10  pkgs : kernel 2.6.12-9-386, postfix 2.2.4, procmail 3.22
Compiled from src : slrn 0.9.8.1/rt (score_color patch), mutt 1.5.11i
                      vim 6.4