On Nov 17, 9:41 am, Yogi <[email protected]> wrote:
> Hi there,
>
> I want to be able to highlight bold, italics, and underlined words in
> a text file. My solution was to use
>
> hi QuickBold gui=bold
> hi QuickItalic gui=italic
> hi QuickUnderline gui=underline
>
> match QuickBold '\[\*\zs.\{-}\ze\*\]'
> match QuickItalic '\[\/\zs.\{-}\ze\/\]'
> match QuickUnderline '\[_\zs.\{-}\ze_\]'
>
> but it does not seem to work. Apparently, "match" can be used to match
> [*only one*] group. So, in the above example, underlining works (since
> it appears last), but bold and italics don't.
>
> Any ideas how I can do it? Do I need to write a syntax file for this?

Yogi,
Have you looked at the Txtfmt plugin?

http://www.vim.org/scripts/script.php?script_id=2208

It does all this and more... For example, it lets you combine bold,
underline and italic attributes (and in one configuration, even
supports the standout, reverse and undercurl attributes). Also, it
lets you apply configurable foreground and background colors to your
text. Here are some screenshots...

http://txtfmt.webs.com/

Hope it helps...
Brett Stahlman



>
> Thanks,
> Yogi
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to