Note that there are some explanatory texts on larger screens.

plurals
  1. POVim syntax files: add to cterm
    primarykey
    data
    text
    <p>Consider a simple text markup language where <code>_underscores denote italics_</code> and <code>*astrisks denote bold*</code>.</p> <p>In an imaginary vim syntax file you might have</p> <pre><code>syntax region italic start='_' end='_' keepend syntax region bold start='*' end='*' keepend highlight italic cterm=italic highlight bold cterm=bold </code></pre> <p>(yes I know that it's <code>\*</code>, I left it as <code>*</code> for clarity.)</p> <p>The problem here is <code>_strings like *this*_</code>. Even if your terminal supports italicBold fonts you only get one at a time in vim.</p> <p>What I really want to do is this:</p> <pre><code>highlight italic cterm+=italic highlight bold cterm+=bold </code></pre> <p>(<code>term</code> and <code>guiterm</code> omitted for clarity.)</p> <p>It's possible to work around this with contained <code>italicBold</code> and <code>boldItalic</code> regions that both set <code>cterm=bold,italic</code>, but things get messy when you want to include <code>underline</code> and everything gets out of hand <em>entirely</em> when you have a red region and a blue region and you wind up with</p> <pre><code>syntax region red ... contains=italicRed,boldRed,underlineRed syntax region italicRed ... contains=italicBoldRed,italicUnderlineRed syntax region italicBoldRed ... contains=italicBoldUnderlineRed . . . highlight red ctermfg=red highlight italicRed cterm=italic ctermfg=red highlight italicBoldRed cterm=italic,bold ctermfg=red . . . </code></pre> <p>ad inifinitum.</p> <p>And the kicker is that really I don't want to hard code the color to <code>red</code>. I'd prefer to</p> <pre><code>highlight link red Statement </code></pre> <p>and then have <code>italicRed</code> use the same highlight definition as <code>red</code> but <em>add</em> the italic setting.</p> <p>There's <em>got</em> to be an easier way to do this. Any suggestions?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload