Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to always display VIM buffers in a status below instead of using ls?

Tags:

vim

When I use VIM and buffers, to see the list of all the buffers, I always have to type :ls to see all the buffers.

Is there a way to have the buffers always be displayed at the bottom of vim?

Edit: So basically let's say I have 2 files open in vimand if I type in :ls it will display something like

  1 #h   "IModuleTest.php" line 422
  3 %a   "~/.vimrc"        line 1

Instead of typing that to see all my files open, I want to see them all the time so I can switch between them faster instead of seeing the buffer list first..

like image 742
CodeCrack Avatar asked Jan 17 '14 19:01

CodeCrack


2 Answers

I like this plugin "vim-bufferline"

First good thing is that it shows up on the empty, unused space of command line, once it finds that the command line is inactive/idle for ~3seconds. And it disappears once we press : (start of a command).

Then it shows on command-line a list of all the buffers open in the Vim and also highlights the active buffer on which the cursor is.

like image 89
Loves Probability Avatar answered Nov 10 '22 09:11

Loves Probability


There are plugins that do that; for example, minibufexpl.vim.

Actually, this need sounds strange. Do you know that commands like :buffer also take a filename, and auto-complete it, too?! GVIM has a Buffers menu by default. And many users have plugins like CtrlP, FuzzyFinder, or Unite to quickly locate buffers and files.

like image 31
Ingo Karkat Avatar answered Nov 10 '22 10:11

Ingo Karkat