-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for switching ruby lambda literals #65
Comments
Sorry it took me a while to get to this. It would be possible to transform the arrow-block into a If it is, one thing I'm considering is adding an option, similar to the one in #67. Maybe something like: " Arrow lambda when splitting, but normal "lambda" when joining
let g:splitjoin_ruby_arrow_lambdas = 'Sj'
" Arrow lambda when joining, but normal "lambda" when splitting
let g:splitjoin_ruby_arrow_lambdas = 'sJ' Does this look like a reasonable option to you? Or do you think it should always be one or the other for some reason? Or is it different depending on circumstances (in which case, maybe it could be added as a rule in switch.vim instead, so you can switch between them on a case-by-case basis)?
Thanks for the kind words :). |
This is wrong. Multi-line lambda in ruby is written like this:
Not with |
that's just like, your opinion, man |
Oh right, sorry, it's only when you pass multiline lambda as a parameter. For example when using It just messed up in my head. |
yeah, you're right on that. |
Sorry, again, for taking so long to address this. For starters, there was a separate issue related to this, actually: AndrewRadev/switch.vim#27 What I implemented there was a way to toggle between the arrow style and lambdas. That said, it would still be a useful tool to have in splitjoin, I assume not many people use the |
Small correction just in case:
Ruby style guide recommends using |
It'd be cool if we could switch between
and
Though there's gonna have to be some fiagling to make it not overlap with the block-syntax splitjoiner
(thanks for the awesome plugin, btw 😄)
The text was updated successfully, but these errors were encountered: