vim – Working with multiple files

#Edit a file in a new buffer

:e

#Go to the next buffer

:bnext or :bn

#Go to the previous buffer

:bprev or :bp

#Delete a buffer (close a file)

:bd

#List all open buffers

:ls

#Open a file in a new buffer and split window

:sp <newFileName>

#Open a file in a new buffer and vertically split window

:vsp <newFileName>

#Split window

Ctrl+ws

#Switch windows

Ctrl+ww

#Quit a window

Ctrl+wq

#Split window vertically

Ctrl+wv

#Move cursor to the left window ( Vertical split )

Ctrl+wh

#Move cursor to the right window ( vertical split )

Ctrl+wl

#Move cursor to the window below( Horizontal split )

Ctrl+wj

#Move cursor to the window above ( Horizontal split )

Ctrl+wk

To contribute :

” If you like Advance Computing and would like to contribute, you can  mail your article to “computingadvance@gmail.com”. You will get credit as your name , email id, designation with article on this blog. “

Leave a Reply