gxk28
gxk28

Reputation: 105

How to stop vim-surround removing newline?

With my cursor on the top curly brace, when I use c-s-{-( this piece of code:

test {
  hello world
  hello world
}

gets transformed into this:

test ( hello world
    hello world
    )

Whereas I would like it to respect the original whitespace, like so :

test (
    hello world
    hello world
)

How can I get vim-surround to behave like this?

Upvotes: 0

Views: 145

Answers (1)

b3z
b3z

Reputation: 189

Maybe you should try cSB) and give it a shot.

Otherwise when on nvim you should try https://github.com/kylechui/nvim-surround.

Upvotes: 2

Related Questions