Open new view into file

1 Point

Michael Priscella Michael Priscella

10 years ago

This snippet opens a new view into the current buffer you're editing. If you want to split the window horizontally instead of vertically replace 'vsp' with 'sp'.

:command NewView vsp | bufnr('%')

Chris Penner

Chris Penner 10 years ago

Isn't this the default behaviour for :sp and :vsp?