Using vim file buffers


Vim has a feature called “file buffers” that works as follows : During a vim session, each time a file is opened, vim keeps an entry for the file in what could be called a “recently opened files” list. This entry is called buffer.

This buffer list can server as a file navigation tool that facilitates the editing of multiple files during the same vim session. When you need to work on a file that you previously opened, you can open the buffer list, locate your file by its name then use the associated buffer number to open it, all without leaving the vim session.


vim commands for file buffers

The basic commands for working with file buffers are listed in the table below :

CommandArgumentsDescription
:lslists the file buffers available in the current vim session
:bN N: buffer number Given a buffer number N, this command opens the file associated to the buffer in the current window
:sbN N: buffer number Given a buffer number N, this command opens the file associated to the buffer in a new window
:bpOpen previous buffer in list
:bnOpen next buffer in list
:onCloses all windows except the current one





Labels: Wireless Internet Security Coding Network Monitoring

Comment

Enter your comment (wiki syntax is allowed):
DKGKF

Wireless Internet Security Performance RADIUS server Wireless Internet Security Performance RADIUS server