Shlomi Fish ([info]shlomif) wrote,
@ 2007-02-08 18:48:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Current location:Home
Current mood: excited
Current music:Shania Twain - Up!
Entry tags:buffer, buffrs, delete, editor, gvim, list, menu, next, previous, switching, tip, vim

Vim Tip: Useful Buffers Commands

Vim supports the concept of buffers, which are basically separate files that you can edit simultaneously in the same editor instance. I normally used the commands :bn (next buffer), :bp (previous buffer) and :bd (delete buffer), but I discovered other useful ones a few days ago.

One can display a list of buffers using the :buffers command, which can also be abbreviated as :ls. Besides each buffer is a number. One can then use the :b $NUMBER command to switch to that buffer. Note that if you're using gvim then the Buffers drop-down menu (Alt+B) will display a list of buffers with their numbers and will allow you to select a buffer to switch.

I'm off to a friend's wedding. Happy vimming!




Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…