The following comparison in function CommentLine is executed for each line and the bottleneck in the current implementation:
synIDattr(synID(a:lnum,indent(a:lnum)+1,1),"name") =~? 'Comment'
A faster alternative may be to parse the comments string (see h: comments).
The following comparison in function
CommentLine
is executed for each line and the bottleneck in the current implementation:synIDattr(synID(a:lnum,indent(a:lnum)+1,1),"name") =~? 'Comment'
A faster alternative may be to parse thecomments
string (seeh: comments
).