Wikia

Vim Tips Wiki

Script:4168

Talk0
1,612pages on
this wiki

Use this page to discuss script 4168 SyntaxRange: define a different filetype syntax on regions of a buffer

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

synmaxcolEdit

I have a discovered a bug in the SyntaxRange plugin. It seems that the inclusion of a very long line disrupts the syntax region. I have a transcript filetype. I include it with this directive:

let transcript_start = '\v^\<!\-\-\s*transcript\s*\-\-\>'
let transcript_end = '\v^\<!\-\-\s*transcriptend\s*\-\-\>'
call SyntaxRange#Include(transcript_start, transcript_end, 'transcript', 'Comment')

Now below are two pictures of an excerpt from the same file. Notice that in the upper photo, there is no highlighting on the lower line-- the preceding line is too long. In the lower photo, I've shortened the preceding line a bit and it does not disrupt highlighting below:

1400530479
1400530492

--Preceding unsigned comment added by S.mackesey 20:22, May 19, 2014

That's not a bug in the plugin, but an effect of the :help 'synmaxcol' option. You can try increasing that value, though this may slow down highlighting. -- Inkarkat (talk) 08:05, May 20, 2014 (UTC)

CommentsEdit

Around Wikia's network

Random Wiki