On Tue, November 17, 2009 4:41 pm, Yogi wrote: > 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?
Use :call matchadd("QuickBold", '\[\*\zs.\{-}\ze\*\]') and vice versa for the other groups. regards, Christian -- :wq --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---