Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Display buffer modified/readonly status in :CtrlPBuffer #283

wants to merge 2 commits into


None yet
2 participants

zah commented Sep 20, 2012

This adds a trailing status indicator for modified/readonly buffers:

> /etc/passwd [R]
> path/to/buffer1 [+]
> path/to/buffer2

I love CtrlP, but I really missed this feature from FuzzyFinder. It's useful in a variety of situations. For example, when vim tells me that there are unsaved buffers on exit, sometimes this surprises me and I quickly open the buffer list to see which buffer is not saved. Sometimes, I will execute a bufdo command that will potentially modify many buffers. I'll then go through the buffers one by one to inspect and finalize the changes. The status indicators help me track which buffers are not yet visited by me.


kien commented Sep 21, 2012

Those indicators interfere with the matching. They also mess up the opening of the buffers because they are added at the source and become a part of the buffer names.

Personally, I'd just use :ls to get a more informative buffer list.


zah commented Sep 21, 2012

Sorry about that, I should have used it for a while before making the pull request.
How about the new version?


kien commented Sep 21, 2012

Just one small (negligible) issue. When in regexp mode, the indicators break the highlighting of the matched string:

> doc/ctrlp.txt [+]
r>> txt$

Normally txt should be highlighted.

@kien kien closed this in 1757bad Sep 28, 2012


kien commented Sep 28, 2012

Thank you! This is good enough for now. I'll try to fix the issue with the highlighting later.

BTW, I've changed the format of the indicators to resemble the output of :ls.


zah commented Sep 28, 2012

Thank you, too.
I was planning to look at the issue myself, but I was too busy the last few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment