A. Jetman
A. Jetman

Reputation: 57

Vim vs command is creating duplicate output in second pane

Whenever I create a vertical split in VIM using the :vs command, the newly created panel is a duplicate of the first, and it updates both panels in real-time as I type.

How can I turn this behaviour off and make it revert to opening a second independent panel?

Upvotes: 1

Views: 524

Answers (1)

romainl
romainl

Reputation: 196789

That's exactly what's supposed to happen. If you don't want what a command does, use another command that does what you want.

From :help :vsplit:

Like :split, but split vertically.

From :help :split:

Split current window in two. The result is two viewports on the same file.

If you scroll down a bit you can find :help :vnew:

Like :new, but split vertically.

Which leads you to :help :new:

Create a new window and start editing an empty file in it.

So… what you want is :vnew.

Upvotes: 4

Related Questions