Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strike>You can manually enter <code>:syntax sync fromstart</code> to force Vim to rescan the syntax from the beginning of the opened file.<br> I would suggest defining a hotkey for convenience:</p> <pre><code>noremap &lt;F5&gt; &lt;Esc&gt;:syntax sync fromstart&lt;CR&gt; inoremap &lt;F5&gt; &lt;C-o&gt;:syntax sync fromstart&lt;CR&gt; </code></pre> <p>Now you can press F5 to clean up most syntax highlighting problems. </p> <p>Also, have a look at Vim's <a href="http://vim.wikia.com/wiki/Fix_syntax_highlighting" rel="nofollow">fixing syntax highlighting - wiki page</a><br> Moreover reading <a href="http://vimdoc.sourceforge.net/htmldoc/syntax.html#%3asyn-sync-first" rel="nofollow">:help :syn-sync-first</a> might shed some more light on the issue.</strike></p> <h2>UPDATE:</h2> <p>I was able to reproduce this behavior on my machine (I'm running Vim 7.3.429).<br> However, when I wrapped the fold markers <code>{{{</code> and <code>}}}</code> in block comments, vim correctly rendered the syntax. You can create appropriately wrapped fold-markers using the <code>zf</code> command. See <a href="http://www.linux.com/learn/tutorials/442438-vim-tips-folding-fun" rel="nofollow">Vim tips: Folding fun</a>. </p> <p>Normally Vim picks the correct blockcomment string based on the currently active syntax. However, my Vim is pretty vanilla and didn't recognize Ruby syntax. I could specify <code>autocmd FileType ruby set commentstring==begin%s=end</code> in my .vimrc file to set the proper block comment. See <a href="http://vimdoc.sourceforge.net/htmldoc/fold.html#fold-create-marker" rel="nofollow">:fold-create-marker</a> for more details.</p> <p>Another solution is to <code>set synmaxcol=0</code>, which will effectively set it to infinity. This causes Vim to check the syntax of the entire line, no matter how long it is. However, I'm not sure what kind of performance penalty you'll have to pay for that.</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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