0

I often use = to indent lines but my configuration doesn't fit my needs.

Is there an option that indent lines like this:

'vim rocks'.capitalize
           .concat(' !')

Instead of this:

'vim rocks'.capitalize
  .concat(' !')

(this post propose a solution)

4
  • 1
    I'm a little bit confused, because you already link to another post which asks the same question with "this post proposes a solution"; so I'm not sure what you're asking as such? Does that solution not work for you? May 18, 2022 at 17:11
  • 4
    Does this answer your question? Ruby indentation: align multiline method chains on the leading dot?
    – Herb
    May 19, 2022 at 16:28
  • At first I was looking for a vimrc option, but it does not exists. The solution above does not work for me, I believe I'm messing with the files location (recently switch to mac, I'm kinda lost). Sorry for the delay, I haven't got much free time this week !
    – Sumak
    May 20, 2022 at 8:08
  • You can put the code from that answer in your vimrc, if you put that inoremap in a autocmd filetype ruby. May 23, 2022 at 15:21

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.