calebsmith / vim-lambdify

Vim plugin that conceals lambda/function syntax with lambda characters
BSD 2-Clause "Simplified" License
52 stars 8 forks source link

Ruby: conceal 'lambda', 'proc' and 1.9 dagger lambda '->' #3

Closed k3rni closed 9 years ago

k3rni commented 9 years ago

While there are certain semantic differences between them, I think it's valid to replace all of them with the lambda character.

k3rni commented 9 years ago

Also, I didn't need to call syntax clear whatever first, works fine without it. Care to explain why it was needed?

calebsmith commented 9 years ago

Great! Thank you for the contriubtion @k3rni . I'll add you to the AUTHORS file if that's fine with you.

The changes look good to me. I'm in the middle of a refactor on the develop branch so I'll likely rework this to use the function I've implemented to avoid the copy pasta that each syntax file has at the moment.

To answer your question, I added the syntax clear bit because most (maybe all?) of the existing plugins I found to do something similar with conceal characters used this. I agree, it doesn't seem to do much. It's something I'm intending to look at more carefully and possibly remove.

Thanks again for the contribution.

k3rni commented 9 years ago

:+1: glad you like it.

I've also tried to do CoffeeScript, but its reverse lambda syntax of (args) -> or (args) => for a bound version doesn't work well with vim's simple conceal.