News for hackers. Stuff that matters.
Re:Advanced tricks with vim registers by mcantor on Wednesday August 10, 2011 @07:26PM (#2870670)
Surprise! You have been using buffers all this time. A "buffer" is just "a file in memory"; if you have 1 split on your screen, with a different file in each split, then you are viewing 2 buffers.

The two things which will probably give you the biggest bang for your buck are:

  :ls
Which lists all buffers currently in memory, and:

  :b
Which supports tab completion, allowing you to instantly jump to any file with just a few keystrokes. You'll also probably enjoy Ctrl + 6 / Ctrl + ^, which swaps between two buffers.

You'll need to do

  :set hidden
before switching between buffers in a single window. Don't worry, though; if you try to quit without saving a modified buffer, or use :bd to delete a buffer without saving it, vim will yell at you.
Re:Advanced tricks with vim registers by yuvipanda on Wednesday August 10, 2011 @09:50PM (#2871000)
<leader>b is a good replacement for both :ls and :b if you're using Command-T (like grandparent is). I was surprised when I discovered that feature, since it isn't quite as advertised/popular as the file opening capabilities of Command-T
Re:Advanced tricks with vim registers by Pewpewarrows on Wednesday August 10, 2011 @10:08PM (#2871035)
Oh wow, that's an excellent find. That immediately made playing around with buffers much easier.
Re:Advanced tricks with vim registers by yuvipanda on Wednesday August 10, 2011 @11:22PM (#2871208)
Indeed! I was using BufferExplorer and accidentally 'discovered' <leader>b. 30 minutes later, BufferExplorer was dead :)
Re:Advanced tricks with vim registers by pyre on Wednesday August 10, 2011 @10:26PM (#2871076)
BufferExplorer is a good plugin to have around. <leader>be will give you a listing of all of your buffers and allow you to do things like hit 'd' to delete the buffer under the cursor.