junegunn / limelight.vim

:flashlight: All the world's indeed a stage and we are merely players

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Different spans for beginning and end of paragraphs

diamondburned opened this issue · comments

Title has it, but just to elaborate, I was trying to make Limelight highlight the comments and the function block. I have this following snippet:

let g:limelight_bop = '\(\n\n^\/\/ .*\n\|^\w.*\(:\|{\|)\)\n\)'
let g:limelight_eop = '\(\n\n\/\/\|^\p\n\n\)'

The issue is the bop regex has 2 results, which means to grab the comments as well, the span needs to be 1. However, if 1 is used for the span of eop, the second code block will be included as well.

I have the same problem trying to isolate one line using the answer of
#40

It's the right answer, as I couldn't really improve to fix this bug

There seems to be some special function here that could help
#59
but I'm not sure how to implement it properly