Closed kengkiat closed 4 years ago
With something like this we have a few ways to do it:
let g:ScalpelAutoEscape='$'
).'iskeyword'
and see if any of them should be escaped).I almost never want to do the first option, in case there's some use case I haven't thought about; I don't want to risk breaking somebody's usage scenario.
I think my preference here is basically in the order of the list above (from least to most preferred):
The only risk is that sometimes "smart" things end up being dumb. 😂 Any thoughts on this?
Ok, thinking about it, it seems that we can just blanket-escape anything that might have special meaning for /\v
. I don't think there is risk of this breaking anybody's workflow, and I don't think we need to try and be "smart" and vary the behavior based on what's in 'iskeyword'
.
Thanks for the PR!
Sorry for the late response. I think it make sense to make it configurable (but with sensible defaults). Will probably submit another PR when I have the time.
Nvm... I see that it's done :)
Fixes #10
I've decided to only escape
$
as I can't think of any other special characters where this is useful. However, this can easily expanded to include other characters.