Skip to main content
The 2024 Developer Survey results are live! See the results
  • vim myfile.txt #open one file in one window
  • :buffers #shows one buffer with "myfile.txt" in it
  • :sp #create split window; we now have one buffer with two windows.
  • :e newfile.txt #create new buffer with new filename in first window
  • :buffers #shows two buffers (myfile.txt & newfile.txt), each in own window
vim myfile.txt  # open one file in one window
:buffers        " shows one buffer with "myfile.txt" in it
:sp             " create split window; we now have one buffer with two windows.
:e newfile.txt  " create new buffer with new filename in first window
:buffers        " shows two buffers (myfile.txt & newfile.txt), each in own window

This is a good link: http://vim.wikia.com/wiki/Easier_buffer_switching

  • vim myfile.txt #open one file in one window
  • :buffers #shows one buffer with "myfile.txt" in it
  • :sp #create split window; we now have one buffer with two windows.
  • :e newfile.txt #create new buffer with new filename in first window
  • :buffers #shows two buffers (myfile.txt & newfile.txt), each in own window

This is a good link http://vim.wikia.com/wiki/Easier_buffer_switching

vim myfile.txt  # open one file in one window
:buffers        " shows one buffer with "myfile.txt" in it
:sp             " create split window; we now have one buffer with two windows.
:e newfile.txt  " create new buffer with new filename in first window
:buffers        " shows two buffers (myfile.txt & newfile.txt), each in own window

This is a good link: http://vim.wikia.com/wiki/Easier_buffer_switching

Source Link
JayS
  • 151
  • 2

  • vim myfile.txt #open one file in one window
  • :buffers #shows one buffer with "myfile.txt" in it
  • :sp #create split window; we now have one buffer with two windows.
  • :e newfile.txt #create new buffer with new filename in first window
  • :buffers #shows two buffers (myfile.txt & newfile.txt), each in own window

This is a good link http://vim.wikia.com/wiki/Easier_buffer_switching